Options available for the HTTP instrumentation (see documentation)

interface HttpInstrumentationConfig {
    applyCustomAttributesOnSpan?: HttpCustomAttributeFunction;
    disableIncomingRequestInstrumentation?: boolean;
    disableOutgoingRequestInstrumentation?: boolean;
    enabled?: boolean;
    headersToSpanAttributes?: {
        client?: { requestHeaders?: string[]; responseHeaders?: string[] };
        server?: { requestHeaders?: string[]; responseHeaders?: string[] };
    };
    ignoreIncomingRequestHook?: IgnoreIncomingRequestFunction;
    ignoreOutgoingRequestHook?: IgnoreOutgoingRequestFunction;
    requestHook?: HttpRequestCustomAttributeFunction;
    requireParentforIncomingSpans?: boolean;
    requireParentforOutgoingSpans?: boolean;
    responseHook?: HttpResponseCustomAttributeFunction;
    serverName?: string;
    startIncomingSpanHook?: StartIncomingSpanCustomAttributeFunction;
    startOutgoingSpanHook?: StartOutgoingSpanCustomAttributeFunction;
}

Hierarchy (View Summary)

Properties

applyCustomAttributesOnSpan?: HttpCustomAttributeFunction

Function for adding custom attributes after response is handled

disableIncomingRequestInstrumentation?: boolean

If set to true, incoming requests will not be instrumented at all.

disableOutgoingRequestInstrumentation?: boolean

If set to true, outgoing requests will not be instrumented at all.

enabled?: boolean

Whether to enable the plugin.

true
headersToSpanAttributes?: {
    client?: { requestHeaders?: string[]; responseHeaders?: string[] };
    server?: { requestHeaders?: string[]; responseHeaders?: string[] };
}

Map the following HTTP headers to span attributes.

ignoreIncomingRequestHook?: IgnoreIncomingRequestFunction

Not trace all incoming requests that matched with custom function

ignoreOutgoingRequestHook?: IgnoreOutgoingRequestFunction

Not trace all outgoing requests that matched with custom function

Function for adding custom attributes before request is handled

requireParentforIncomingSpans?: boolean

Require parent to create span for incoming requests

requireParentforOutgoingSpans?: boolean

Require parent to create span for outgoing requests

Function for adding custom attributes before response is handled

serverName?: string

The primary server name of the matched virtual host.

Function for adding custom attributes before a span is started in incomingRequest

Function for adding custom attributes before a span is started in outgoingRequest