A setup helper for the OpenTelemetry SDKs (logs, metrics, traces).
After successful setup using (), use `@opentelemetry/api` to obtain the registered components.
Use the shutdown handler () to ensure your telemetry is exported before the process exits.
Example: Register SDK by using environment variables
constnodeSdk = newNodeSDK(); // providing no options uses OTEL_* environment variables for SDK setup. nodeSdk.start(); // registers all configured SDK components
Example: Override environment variable config with your own components
constnodeSdk = newNodeSDK({ // override the list of metric reader with your own options and ignore environment variable config // explore the docs of other options to learn more! metricReaders: [ newPeriodicExportingMetricReader({ exporter:newOTLPMetricsExporter() })] }); nodeSdk.start(); // registers all configured SDK components
A setup helper for the OpenTelemetry SDKs (logs, metrics, traces).
After successful setup using (), use `@opentelemetry/api` to obtain the registered components.
Use the shutdown handler () to ensure your telemetry is exported before the process exits.
Example: Register SDK by using environment variables
Example: Override environment variable config with your own components