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, Bunyan instrumentation, and Bunyan logging framework packages:
Configure the SDK
Create an initialization file (for example, Then, in your application, create and use Bunyan loggers to capture interesting things:
telemetry.js) that sets up the SDK with Bunyan instrumentation.
The exporter configuration is provided by the otelconfig.yaml file at runtime.Create a Config File
Create an To send logs to an OpenTelemetry Collector instead:
otelconfig.yaml file to configure your exporter.To send logs to Honeycomb:Supported Logging Frameworks
The OpenTelemetry JavaScript SDK can automatically create logs from these supported logging frameworks:- Bunyan
- Winston