# RequestTraceConfig

**Kind**: interface | **Module**: [Insights](https://docs.interop.io/desktop/reference/javascript/insights/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/insights/requesttraceconfig/index.html

## Properties

- **`allowRoot`** (`boolean`, optional) default: `true`
  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`, required)
  Whether fetch and XHR requests will be instrumented with traces automatically.
- **`errorStatusCodes`** (`(string | number)[]`, optional) default: `["4xx", "5xx"]`
  An array of HTTP response status codes to consider as errors. Status code families can be described as 4xx, 5xx, etc.
- **`ignorePattern`** (`string`, optional)
  Optional regex pattern for URLs that should be excluded from auto instrumentation.
- **`ignoreTelemetryURLs`** (`boolean`, optional) default: `true`
  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`, optional)
  Optional regex pattern, if specified, only matching URLs will be auto instrumented.
- **`requestBytesMetric`** (`boolean | string`, optional) default: `false`
  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`, optional) default: `false`
  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`, optional) default: `false`
  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.
