1.8.0 • Published 2 months ago

@azure/monitor-opentelemetry v1.8.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months 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.8.0

2 months ago

1.7.1

3 months ago

1.6.0

6 months ago

1.7.0

4 months ago

1.5.0

8 months ago

1.4.0

8 months ago

1.3.0

9 months ago

1.2.0

11 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

1.0.0-beta.2

1 year ago

1.0.0-beta.3

1 year ago

1.0.0-beta.0

1 year ago

1.0.0-beta.1

1 year ago