TracesSettingsinterface
Properties (54)
| 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., A function is asked once, on the first read after the build, and its answer is kept: the SDK's resource is made once, at its creation, and the readers that look at the resource attributes on every span (the span filters' context, the sampler) see the same values. |
| addResourceAttributesToAttributes⚓︎ | boolean | false | x | Whether to add resource attributes to span attributes. |
| attributeSettings⚓︎ | { [x: string]: AttributeSettings } | x | x | Controls the publishing of specific attributes, by name. An entry names an attribute by its
flattened (dot-separated) name, or everything nested under it - Applies to everything written on every span - the filtering context, the additional
attributes, the data added through The The trace metrics ( |
| attributeSettingsMode⚓︎ | AttributeSettingsMode | x | x | How the |
| 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 The span is created by a close handler of the window - every time the platform asks the
window to close, also when the close ends up prevented - and flushed, within a second,
before the handler lets the close go on. With |
| 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 }) | (() => Promise<{ [x: string]: string }>) | x | x | Additional headers to send in HTTP requests, e.g. when using HTTP exporters. |
| hybridContextMode⚓︎ | boolean | false | x | Had the library resolve the current context from both the ContextManager
provided by the OTEL SDK and the |
| instrumentAppLoad⚓︎ | boolean | false | x | If |
| instrumentAppStartup⚓︎ | boolean | AppStartupTraceConfig | true | x | If The uncaught errors, the slowest resource loads and the long tasks of the startup window are published under the root as the spans of the dedicated instrumentations - "interopio.api.instrumentation.errors.*", ".resource" and ".eventLoopBlocking", with the same attributes - so they look the same whether instrumentErrors / instrumentResources / instrumentEventLoop is on (which then publishes them) or off (this trace does). Errors are counted on the root (lifecycle.errorCount) either way, and perf.vitals.cls is the same session-window score instrumentWebVitals reports, for the startup window. 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 parentSpanTimeoutMs 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 Every span is a child of one "interopio.api.instrumentation.eventLoop.session" span that lives as long as the page - a trace of its own, linked to the startup span when the instrumentation starts during the startup window - and carries the running totals as attributes (inputDelayCount / inputDelayTotalMs / inputDelayMaxMs, blockingCount / blockingTotalMs / blockingMaxMs), updated as the entries come and counting on past the span caps. It ends when the page goes away (pagehide, flushed) or at the final export, so it arrives after its children. |
| 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 Every report is a child of one "interopio.api.instrumentation.webVitals.session" span that lives as long as the page - a trace of its own, linked to the startup span when the instrumentation starts during the startup window - and carries the current CLS, INP, LCP and interaction count as attributes, updated as they come. It ends when the page goes away (pagehide, flushed) or at the final export, so it arrives after its children. |
| keepAlive⚓︎ | boolean | true | x | Whether to keep the connection alive when sending traces. |
| otlpExporterConfig⚓︎ | OTLPExporterNodeConfigBase | x | x | x |
| parentFromOTELContext⚓︎ | boolean | false | x | If Needs a ContextManager ( |
| 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. |
| restoreCurrentTracingState⚓︎ | boolean | false | x | If |
| 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" | "dom-ready" | "loaded" | "any" | x | When will the application startup span be considered completed. Still honoured, as the fallback for parentSpanEnd in the instrumentAppStartup configuration object - which overrides it, and where it is documented. |
| startupParentSpanTimeoutMs⚓︎ | number | 3000 | x | If non-zero, how long after application startup will any traced operations automatically be nested under the application startup trace. Still honoured, as the fallback for parentSpanTimeoutMs in the instrumentAppStartup configuration object - which overrides it, and where it is documented. |
| 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. |