1.4.0 • Published 23 hours ago

@azure/monitor-opentelemetry v1.4.0

Weekly downloads
-
License
MIT
Repository
-
Last release
23 hours ago

Azure Monitor OpenTelemetry client library for JavaScript

npm version

Getting started

Install the package

npm install @azure/monitor-opentelemetry

Currently supported environments

See our support policy for more details.

Prerequisites

Enable Azure Monitor OpenTelemetry Client

Important: AzureMonitorOpenTelemetryClient must be setup and started before you import anything else. There may be resulting telemetry loss if other libraries are imported first.

const { AzureMonitorOpenTelemetryClient, AzureMonitorOpenTelemetryConfig } = require("@azure/monitor-opentelemetry");

const config = new AzureMonitorOpenTelemetryConfig();
config.connectionString = "<YOUR_CONNECTION_STRING>";
const client = new AzureMonitorOpenTelemetryClient(config);
  • Connection String could be set using the environment variable APPLICATIONINSIGHTS_CONNECTION_STRING

Examples

For complete samples of a few champion scenarios, see the samples/ folder.

Key concepts

For more information on the OpenTelemetry project, please review the OpenTelemetry Specifications.

Troubleshooting

Enable debug logging

You can enable debug logging by changing the logging level of your provider.

const { DiagConsoleLogger, DiagLogLevel, diag } = require("@opentelemetry/api");
const { NodeTracerProvider } = require("@opentelemetry/sdk-trace-node");

const provider = new NodeTracerProvider();
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.ALL);
provider.register();

Plugin Registry

To see if a plugin has already been made for a library you are using, please check out the OpenTelemetry Registry.

If you cannot your library in the registry, feel free to suggest a new plugin request at opentelemetry-js-contrib.

Contributing

If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.

Impressions

1.4.0

12 days ago

1.3.0

1 month ago

1.2.0

3 months ago

1.1.1

6 months ago

1.1.0

7 months ago

1.0.0

7 months ago

1.0.0-beta.2

8 months ago

1.0.0-beta.3

8 months ago

1.0.0-beta.0

10 months ago

1.0.0-beta.1

10 months ago