Insights.Configinterface
Configuration for publishing io.Insights data.
Properties (17)
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| additionalAttributes⚓︎ | { [x: string]: unknown; } | (() => { [x: string]: unknown; }) | x | x | Additional properties to publish as part of each OpenTelemetry signal, 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 properties to publish as part of the OpenTelemetry resource definition for all OpenTelemetry signals, 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 signal attributes. |
| applicationName⚓︎ | string | x | x | Application name to use in telemetry information. By default, it's populated by io.Connect. |
| enabled⚓︎ | boolean | x | Whether library is enabled. If disabled, API is still usable, but methods are no-ops. |
|
| errorlessMode⚓︎ | boolean | false | x | If |
| failOnInitError⚓︎ | boolean | x | x | If failure to initialize library will throw upstream error. |
| 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. |
| metrics⚓︎ | MetricsSettings | x | x | Settings for publishing io.Insights metrics. |
| platformVersion⚓︎ | string | x | x | If provided, this value will be added to the metrics and span attributes and to the span filtering context (see 'filters' in TracesSettings). |
| registerGlobalOTELObjects⚓︎ | boolean | "force" | true | x | Whether the library should register its own instances of the OTEL SDK global objects, e.g. MeterProvider. This is useful for controlling which instance of the SDK is used, in applications that initialize their own SDK. If If If |
| serviceId⚓︎ | string | x | x | If provided, this value will be added to the metrics and traces service.instance.id attribute, unless an OTEL service object (e.g. TraceProvider) has been provided to the library with a different setting. |
| serviceName⚓︎ | string | x | x | If provided, this value will be added to the metrics and traces service.name attribute, unless an OTEL service object (e.g. TraceProvider) has been provided to the library with a different setting. |
| serviceVersion⚓︎ | string | x | x | If provided, this value will be added to the metrics and traces service.version attribute, unless an OTEL service object (e.g. TraceProvider) has been provided to the library with a different setting. attribute. |
| traces⚓︎ | TracesSettings | x | x | Settings for publishing io.Insights traces. |
| useExistingOTELSDK⚓︎ | boolean | false | x | If Ordering matters: the trace and logs globals are proxies that late-bind, so signals emitted before the host registers its SDK are dropped and start flowing once it does; the metrics global is a snapshot, which io.Insights compensates for by re-resolving it per meter creation - but meters created before the host registered stay bound to the noop. Register the host SDK before initializing io.Insights for full coverage. In this mode io.Insights registers nothing: registerGlobalOTELObjects is effectively ignored, the global propagator is whatever the host registered (header injection rides it), resource attributes come from the host's providers (io.Insights resource settings are unused), and waitForFinalExport is best-effort - flushing on shutdown is the host SDK's responsibility. |
| userId⚓︎ | string | x | x | If provided, this value will be added to the metrics and traces user.id attribute, unless an OTEL service object (e.g. TraceProvider) has been provided to the library with a different setting. |