1
0
Форкнуть 0
This repository is home to Azure Monitor Exporters and SDKs for the OpenTelemetry JavaScript Project (https://github.com/open-telemetry/opentelemetry-js)
Перейти к файлу
Mark Wolff 6dc14c3cbe
fix: do not throw when no dir (#48)
2020-06-26 14:54:08 -04:00
.github/workflows chore: only upload codecov on 14.x (#43) 2020-06-26 14:53:01 -04:00
.vscode address comments 2020-04-07 14:30:44 -04:00
examples fix: send stringified _MS_Links (#42) 2020-06-26 14:53:19 -04:00
packages/azure-opentelemetry-exporter fix: do not throw when no dir (#48) 2020-06-26 14:54:08 -04:00
.gitignore Update README.md (#16) 2020-05-22 13:29:45 -04:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2020-04-03 10:15:49 -07:00
LICENSE Initial LICENSE commit 2020-04-03 10:15:50 -07:00
README.md fix: send correct envelope timestamp (#41) 2020-06-23 18:40:20 -04:00
SECURITY.md Initial SECURITY.md commit 2020-04-03 10:15:51 -07:00
codecov.yml add codecov.yml (#30) 2020-06-03 20:07:11 -04:00
lerna.json chore: bump to 1.0.0-preview.2 (#34) 2020-06-11 17:10:13 -04:00
package.json fix: send stringified _MS_Links (#42) 2020-06-26 14:53:19 -04:00
tsconfig.base.json add lerna (#9) 2020-04-23 16:55:47 -04:00

README.md

Azure Monitor JavaScript Exporter for OpenTelemetry

npm version codecov Node.js CI

Getting Started

This exporter package assumes your application is already instrumented with the OpenTelemetry SDK. Once you are ready to export OpenTelemetry data, you can add this exporter to your application:

npm install @azure/monitor-opentelemetry-exporter

Distributed Tracing

Add the exporter to your existing OpenTelemetry tracer provider (NodeTracerProvider / BasicTracerProvider)

const { AzureMonitorTraceExporter } = require('@azure/monitor-opentelemetry-exporter');
const { NodeTracerProvider } = require('@opentelemetry/node');
const { BatchSpanProcessor } = require('@opentelemetry/tracing');

// Use your existing provider
const provider = new NodeTracerProvider({
  plugins: {
    https: {
      // Ignore Application Insights Ingestion Server
      ignoreOutgoingUrls: [new RegExp(/dc.services.visualstudio.com/i)],
    },
  },
});
provider.register();

// Create an exporter instance
const exporter = new AzureMonitorTraceExporter({
  logger: provider.logger,
  instrumentationKey: 'ikey',
});

// Add the exporter to the provider
provider.addSpanProcessor(new BatchSpanProcessor(exporter, {
  bufferTimeout: 15000,
  bufferSize: 1000,
}));

Metrics

Coming Soon

Logs

Coming Soon

Examples

Please take a look at the examples to see how to add the Azure Monitor Exporter to your existing OpenTelemetry instrumented project.

Compiling This Project

npm install
npm run build
npm run lint
npm run test

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.