Function: createHttpServerAttributes()
@arolariu/website / instrumentation.server / createHttpServerAttributes
Function: createHttpServerAttributes()
createHttpServerAttributes(
method,statusCode,options?):HttpAttributes
Defined in: instrumentation.server.ts:720
Creates HTTP semantic attributes for server operations.
Parameters
method
The HTTP method (GET, POST, etc.)
statusCode
number
The HTTP response status code
options?
Additional HTTP-related attributes
route?
string
target?
string
userAgent?
string
clientAddress?
string
Returns
Type-safe HTTP attributes
Example
const attrs = createHttpServerAttributes('GET', 200, {
route: '/api/users/:id',
target: '/api/users/123',
});
// was this page useful?