Show / Hide Table of Contents

Azure Monitor Exporter client library for .NET

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

Getting started

Prerequisites

  • Azure Subscription: To use Azure services, including Azure Monitor Exporter for OpenTelemetry .NET, you'll need a subscription. If you do not have an existing Azure account, you may sign up for a free trial or use your Visual Studio Subscription benefits when you create an account.
  • Azure Application Insights Connection String: To send telemetry data to the monitoring service you'll need connection string from Azure Application Insights. If you are not familiar with creating Azure resources, you may wish to follow the step-by-step guide for Create an Application Insights resource and copy the connection string.

Install the package

Latest Version: Nuget

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

  • via Package Manager:
    Install-Package Azure.Monitor.OpenTelemetry.Exporter
    
  • via .NET CLI:
    dotnet add package Azure.Monitor.OpenTelemetry.Exporter
    

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 Azure.Monitor.OpenTelemetry.Exporter;
using OpenTelemetry.Trace;

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

Troubleshooting

The Azure Monitor exporter uses EventSource for its own internal logging. The exporter logs are available to any EventListener by opting into the source named "OpenTelemetry-AzureMonitor-Exporter".

Next steps

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

Contributing

See CONTRIBUTING.md for details on contribution process.

Release Schedule

This exporter is under active development.

The library is not yet generally available, and is not officially supported. Future releases will not attempt to maintain backwards compatibility with previous releases. Each beta release includes significant changes to the exporter package, making them incompatible with each other.

Back to top Azure SDK for .NET