Skip to main content

Function: createHttpClientAttributes()

@arolariu/website


@arolariu/website / instrumentation.server / createHttpClientAttributes

Function: createHttpClientAttributes()

createHttpClientAttributes(method, url, statusCode?): Partial<HttpAttributes>

Defined in: instrumentation.server.ts:758

Creates HTTP semantic attributes for client operations.

Parameters​

method​

HttpMethod

The HTTP method being used

url​

string

The full URL being requested

statusCode?​

number

The HTTP response status code (optional)

Returns​

Partial<HttpAttributes>

Type-safe HTTP attributes

Example​

const attrs = createHttpClientAttributes('POST', 'https://api.example.com/users', 201);
// was this page useful?