Logs support in the OpenTelemetry JavaScript SDK is currently experimental and subject to change.
To check the status for each language, refer to the OpenTelemetry status page.
Acquire Dependencies
Install the OpenTelemetry Node.js SDK, OTLP exporter, and Bunyan logging framework packages:
Configure the Logger Provider
During application setup, create and configure the logger provider.
This is typically done in a separate file that you require before starting your application.For example, add the following to a file called Then, in your application, create and use Bunyan loggers to capture interesting things:
telemetry.js:Supported Logging Frameworks
The OpenTelemetry JavaScript SDK can automatically create logs from these supported logging frameworks:- Bunyan
- Winston