Options for Request Instrumentation


  • RequestInstrumentationOptions


_experiments: Partial<{
    enableHTTPTimings: boolean;

Allow experiments for the request instrumentation.

Type declaration

  • enableHTTPTimings: boolean
traceFetch: boolean

Flag to disable patching all together for fetch requests.

Default: true

tracePropagationTargets: (string | RegExp)[]

List of strings and/or regexes used to determine which outgoing requests will have sentry-trace and baggage headers attached.

Default: ['localhost', /^//] {@see DEFAULT_TRACE_PROPAGATION_TARGETS}

traceXHR: boolean

Flag to disable patching all together for xhr requests.

Default: true

tracingOrigins: (string | RegExp)[]


Will be removed in v8. Use shouldCreateSpanForRequest to control span creation and tracePropagationTargets to control trace header attachment.


  • This function will be called before creating a span for a request with the given url. Return false if you don't want a span for the given url.

    Default: (url: string) => true


    • this: void
    • url: string

    Returns boolean

Generated using TypeDoc