TracesSettingsinterface
Properties (50)
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| additionalAttributes⚓︎ | { [x: string]: unknown } | (() => { [x: string]: unknown }) | x | x | Additional span attributes to publish as part of each span, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., |
| additionalResourceAttributes⚓︎ | { [x: string]: unknown } | (() => { [x: string]: unknown }) | x | x | Additional attributes to publish as part of the OTEL resource definition, specified as key/value pairs. You can use environment variables as values. Environment variables must start and end with a percent sign (e.g., |
| addResourceAttributesToAttributes⚓︎ | boolean | false | x | Whether to add resource attributes to span attributes. |
| clickstream⚓︎ | boolean | "nested" | "sibling" | ClickstreamTraceConfig | true | x | Whether the clickstream trace will be enabled. false - clickstream trace is disabled. true - same as sibling nested - clickstream trace is enabled and each subsequent span is a child span of the previous one. sibling - clickstream trace is enabled and each subsequent span is a child of the same initial span. |
| closeTrace⚓︎ | boolean | false | x | If |
| compression⚓︎ | CompressionAlgorithm | x | x | Compression algorithm to use when exporting trace. |
| concurrencyLimit⚓︎ | number | x | x | Maximum number of concurrent trace export requests. |
| console⚓︎ | boolean | x | x | If an OTEL TraceProvider isn't provided to the library, it will initialize its own. If 'console' is 'true', TracerProvider will have a ConsoleTraceExporter. |
| contextManager⚓︎ | (tracesSettings: TracesSettings, settings: Settings) => ContextManager | x | x | Allows specifying a constructor callback for creating the ContextManager instance. |
| countMetric⚓︎ | boolean | string | null | true | x | If |
| defaultFilters⚓︎ | SpanFilter[] | x | x | This property is for internal use only. |
| defaults⚓︎ | SpanCreationOptions | x | x | Default settings if appropriate entries aren't found in 'filters' and 'sampling' collections. |
| durationMetric⚓︎ | boolean | string | null | true | x | If |
| enabled⚓︎ | boolean | false | Whether tracing functionality is enabled. If disabled, API is still usable, but methods are no-ops. |
|
| exporterSettings⚓︎ | OTLPExporterNodeConfigBase | x | x | If an OTEL TraceProvider isn't provided to the library, it will initialize its own. If 'url' is specified, TracerProvider will have an OTLPTraceExporter with 'url' as detination URL and 'exporterSettings' as additional config. |
| filters⚓︎ | SpanFilter[] | x | x | Array of filter entries used to determine whether a particular operation will create a tracing span, and what verbosity level will apply to attributes added to that span. If no matching filter entry is found, the settings from 'default' are used. |
| headers⚓︎ | { [x: string]: string } | (() => { [x: string]: string }) | x | x | Additional headers to send in HTTP requests, e.g. when using HTTP exporters. |
| hybridContextMode⚓︎ | boolean | false | x | If |
| instrumentAppLoad⚓︎ | boolean | false | x | If |
| instrumentAppStartup⚓︎ | boolean | true | x | If Also works in NodeJS: the root span opens at process start and the startup window nesting applies, but the browser performance-timeline children are not produced. The window closes on startupParentSpanTimeoutMs or an explicit startupTraceFinished() call ("loader" mode behaves as "any" in Node - there is no loader signal). When the platform provides a root propagation info, the startup span is parented under it. |
| instrumentDocumentLoad⚓︎ | boolean | false | x | If |
| instrumentErrors⚓︎ | boolean | ErrorInstrumentationConfig | false | x | If Also works in NodeJS, via process.uncaughtExceptionMonitor - a behavior-preserving hook: the process still crashes exactly as it would have. The span processors are force-flushed immediately, so the crash span is exported whenever anything keeps the process alive past the crash (an application 'uncaughtException' handler, a graceful shutdown); on a hard crash the export cannot complete and the span is lost with the process. Under Node's default unhandled-rejections=throw mode, crash-grade unhandled rejections are reported too; non-crashing rejection observation is deliberately not done in Node, because subscribing to process.unhandledRejection would suppress Node's default crash semantics. |
| instrumentEventLoop⚓︎ | boolean | EventLoopInstrumentationConfig | false | x | If |
| instrumentNavigation⚓︎ | boolean | false | x | If |
| instrumentRequests⚓︎ | boolean | RequestTraceConfig | false | x | If |
| instrumentResources⚓︎ | boolean | ResourceInstrumentationConfig | false | x | If |
| instrumentWebSockets⚓︎ | boolean | WebSocketInstrumentationConfig | false | x | If When the pre-init module (early.js) is loaded, sockets are tracked from page start: connections that closed before initialization become retroactive spans, and connections still open are adopted with spans starting at their true construction time and counters carried across - a socket opened at bootstrap is fully observed. Without the pre-init module, sockets constructed before initialization are not observed at all. |
| instrumentWebVitals⚓︎ | boolean | WebVitalsInstrumentationConfig | false | x | If |
| keepAlive⚓︎ | boolean | true | x | Whether to keep the connection alive when sending traces. |
| otlpExporterConfig⚓︎ | OTLPExporterNodeConfigBase | x | x | x |
| parentNameLimit⚓︎ | number | x | x | Maximum length for parent operation names in span hierarchies. |
| processorSettings⚓︎ | BatchSpanProcessorBrowserConfig | x | x | Configuration for the batch span processor buffer settings. |
| propagator⚓︎ | (tracesSettings: TracesSettings, settings: Settings) => TextMapPropagator | x | x | Allows specifying a constructor callback for creating the TextMapPropagator instance. |
| publishInterval⚓︎ | number | x | x | Interval in milliseconds between trace export batches. |
| resultMetric⚓︎ | boolean | string | null | true | x | If |
| rootPropagationInfo⚓︎ | PropagationInfo | x | x | Property for internal use. |
| sampler⚓︎ | (defaultSampler: Sampler, tracesSettings: TracesSettings, settings: Settings) => Sampler | x | x | Allows specifying a constructor callback for creating the Sampler instance. |
| sampling⚓︎ | SamplingSettings[] | x | x | Array of sampling setting entries used to determine whether a span will be sampled. If no matching sampling setting entry is found, the settings from 'defaults' are used. |
| spanExporters⚓︎ | (exporterSettings: OTLPExporterNodeConfigBase, tracesSettings: TracesSettings, settings: Settings) => SpanExporter[] | x | x | Allows specifying a constructor callback for creating the SpanExporter instances. |
| spanProcessors⚓︎ | (processorSettings: BatchSpanProcessorBrowserConfig | undefined, exporterSettings: OTLPExporterNodeConfigBase, tracesSettings: TracesSettings, settings: Settings) => SpanProcessor[] | x | x | Allows specifying a constructor callback for creating the SpanProcessor instances. |
| ssoAuth⚓︎ | SSOAuthSettings | x | x | Overrides the properties of the top-level |
| startupParentSpanEnd⚓︎ | "explicit" | "timeout" | "loader" | "any" | "any" | x | When will the application startup span be considered completed, so that further spans are added under it.
In NodeJS there is no loader signal (or DOM readiness): "loader" behaves as "any", and the timeout counts alone. |
| startupParentSpanTimeoutMs⚓︎ | number | 3000 | x | If non-zero, how long after application startup will any traced operations automatically be nested under the application startup trace. The timeout is counted from the moment the io.Connect API begins initializing. Without a timeout the startup window only closes on an explicit startupTraceFinished() call (or the loader signal in io.Connect Desktop windows) - the root span stays open, and unexported, until then. |
| timeoutMillis⚓︎ | number | 10000ms. | x | Maximum time the OTLP exporter will wait for each batch export. |
| tracerProvider⚓︎ | (tracerProviderSettings: TracerConfig, tracesSettings: TracesSettings, settings: Settings) => TracerProvider | x | x | Allows specifying a constructor callback for creating the tracerProvider instance. |
| tracerProviderSettings⚓︎ | TracerConfig | x | x | OTEL TracerConfig - provides an interface for configuring a Basic Tracer. |
| url⚓︎ | string | x | x | If an OTEL TraceProvider isn't provided to the library, it will initialize its own. If 'url' is specified, TracerProvider will have an OTLPTraceExporter using this destination URL. |
| useDefaultFilters⚓︎ | boolean | true. | x | If true, use a predefined list of filters for well-known platform traces. |
| useOTELContextManager⚓︎ | boolean | false | x | If Otherwise, use See https://opentelemetry.io/docs/languages/js/propagation/ and https://opentelemetry.io/docs/languages/js/context/#context-manager for more information. |
| userJourney⚓︎ | boolean | "nested" | "sibling" | UserJourneyTraceConfig | true | x | Whether the user journey trace will be enabled. false - User Journey trace is disabled. nested - User Journey trace is enabled and each subsequent span is a child span of the previous one. sibling - User Journey trace is enabled and each subsequent span is a child of the same initial span. |