Optional attributesA map of attributes that should be created from the request headers. The keys of the map are attribute names and the values are request header names. If a resonse header doesn't exist, no attribute will be created for it.
Example: fetch: { attributesFromRequestHeaders: { "attr1": "X-Attr" } }
Optional attributesA map of attributes that should be created from the response headers. The keys of the map are attribute names and the values are response header names. If a resonse header doesn't exist, no attribute will be created for it.
Example: fetch: { attributesFromResponseHeaders: { "attr1": "X-Attr" } }
Optional dontA set of URL matchers (string prefix or regex) for which the tracing context
should not be propagated (see propagators). This allows you to exclude a
subset of URLs allowed by the propagateContextUrls.
Can be overriden by the opentelemetry.propagateContext property in the RequestInit object.
Optional enabledWhether to enable the plugin.
true
Optional ignoreA set of URL matchers (string prefix or regex) that should be ignored from tracing.
By default all URLs are traced.
Can be overriden by the opentelemetry.ignore property in the RequestInit object.
Example: fetch: { ignoreUrls: [/example.com/] }.
Optional propagateA set of URL matchers (string prefix or regex) for which the tracing context
should be propagated (see propagators).
By default the context is propagated only for the
deployment URLs, all
other URLs should be enabled explicitly.
Can be overriden by the opentelemetry.propagateContext property in the RequestInit object.
Example: fetch: { propagateContextUrls: [ /my.api/ ] }.
Optional resourceA string for the "resource.name" attribute that can include attribute expressions in {}.
Can be overriden by the opentelemetry.attributes property in the RequestInit object.
Example: fetch: { resourceNameTemplate: "{http.host}" }.
Configuration for the "fetch" instrumentation.
Some of this configuration can be overriden on a per-fetch call basis by using the
opentelemetryproperty in theRequestInitobject (requires Next 14.1.1 or above). This property can include:ignore: boolean - whether to ignore the fetch call from tracing. OverridesignoreUrls.propagateContext: boolean: overridespropagateContextUrlsfor this call.spanName: string: overrides the computed span name for this call.attributes: Attributes: overrides the computed attributes for this call.