Share via


Azure Monitor Exporter client library for .NET - version 1.0.0-beta.1

The OpenTelemetry .NET exporters which send telemetry data to Azure Monitor following the OpenTelemetry Specification.

Getting started

Prerequisites

Install the package

Install the Azure Monitor Exporter for OpenTelemetry .NET with NuGet:

dotnet add package Microsoft.OpenTelemetry.Exporter.AzureMonitor

Authenticate the client

Exporter does not use authentication.

Key concepts

This exporter sends traces to the configured Azure Monitor Resource using HTTPS. IP addresses used by the Azure Monitor is documented in IP addresses used by Application Insights and Log Analytics.

Examples

Refer to DemoTrace.cs for a complete demo.

using Microsoft.OpenTelemetry.Exporter.AzureMonitor;
using OpenTelemetry.Trace;

OpenTelemetry.Sdk.CreateTracerProviderBuilder()
    .AddSource("Demo.DemoClient")
    .AddAzureMonitorTraceExporter(o => {
        o.ConnectionString = "<Your Connection String>";
    })
    .Build();

Troubleshooting

This exporter logs event using the .NET EventSource to emit information. The exporter logs are available to any EventListener by opting into the source named "OpenTelemetry-TraceExporter-AzureMonitor".

Next steps

For more information on Azure SDK, please refer to this website

Contributing

See CONTRIBUTING.md for details on contribution process.