Skip to main content

Properties (9)

Property Type Default Required Description
allowRoot⚓︎ boolean true x

Whether request instrumentation spans can be root spans of new traces. This allows you to trace requests without any instrumentation in your own code, but may create a large number of traces. This will not affect metrics.

enabled⚓︎ boolean x

Whether fetch and XHR requests will be instrumented with traces automatically.

errorStatusCodes⚓︎ (string | number)[] ["4xx", "5xx"] x

An array of HTTP response status codes to consider as errors. Status code families can be described as 4xx, 5xx, etc.

ignorePattern⚓︎ string x x

Optional regex pattern for URLs that should be excluded from auto instrumentation.

ignoreTelemetryURLs⚓︎ boolean true x

If true, requests to the OTEL Collector endpoints will not be instrumented. Recommended to keep true, since otherwise the request caused by the auto instrumentation telemetry will itself cause auto instrumentation to kick in and so on, creating unnecessary telemetry.

matchPattern⚓︎ string x x

Optional regex pattern, if specified, only matching URLs will be auto instrumented.

requestBytesMetric⚓︎ boolean | string false x

If true or a string, the request size in bytes will be published as a histogram metric. If a string value is specified, this will be the name of the metric. Otherwise, the semantic convention default "http.client.request.body.size" is used.

requestDurationMetric⚓︎ boolean | string false x

If true or a string, the request duration will be published as a histogram metric. If a string value is specified, this will be the name of the metric. Otherwise, the semantic convention default "http.client.request.duration" is used.

responseBytesMetric⚓︎ boolean | string false x

If true or a string, the request size in bytes will be published as a histogram metric. If a string value is specified, this will be the name of the metric. Otherwise, the semantic convention default "http.client.response.body.size" is used.