Azure.Monitor.OpenTelemetry.Exporter
1.0.0-beta.7
See the version list below for details.
dotnet add package Azure.Monitor.OpenTelemetry.Exporter --version 1.0.0-beta.7
NuGet\Install-Package Azure.Monitor.OpenTelemetry.Exporter -Version 1.0.0-beta.7
<PackageReference Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.0.0-beta.7" />
paket add Azure.Monitor.OpenTelemetry.Exporter --version 1.0.0-beta.7
#r "nuget: Azure.Monitor.OpenTelemetry.Exporter, 1.0.0-beta.7"
// Install Azure.Monitor.OpenTelemetry.Exporter as a Cake Addin
#addin nuget:?package=Azure.Monitor.OpenTelemetry.Exporter&version=1.0.0-beta.7&prerelease
// Install Azure.Monitor.OpenTelemetry.Exporter as a Cake Tool
#tool nuget:?package=Azure.Monitor.OpenTelemetry.Exporter&version=1.0.0-beta.7&prerelease
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](https://img.shields.io/nuget/vpre/Azure.Monitor.OpenTelemetry.Exporter.svg)
Install the Azure Monitor Exporter for OpenTelemetry .NET with NuGet:
dotnet add package Azure.Monitor.OpenTelemetry.Exporter --prerelease
Nightly builds
Nightly builds are available from this repo's dev feed. These are provided without support and are not intended for production workloads.
Add the Exporter
The following examples demonstrate how to add the AzureMonitorExporter
to your OpenTelemetry configuration.
Traces
Sdk.CreateTracerProviderBuilder() .AddAzureMonitorTraceExporter(o => o.ConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000") .Build();
For a complete example see TraceDemo.cs.
Metrics
Sdk.CreateMeterProviderBuilder() .AddAzureMonitorMetricExporter(o => o.ConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000") .Build();
For a complete example see MetricDemo.cs.
Logs
LoggerFactory.Create(builder => { builder.AddOpenTelemetry(options => { options.AddAzureMonitorLogExporter(o => o.ConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000"); }); });
For a complete example see LogDemo.cs.
Authenticate the client
Exporter does not use authentication.
Key concepts
Some key concepts for .NET include:
Overview of .NET distributed tracing: Distributed tracing is a diagnostic technique that helps engineers localize failures and performance issues within applications, especially those that may be distributed across multiple machines or processes.
Overview of Logging in .NET: .NET supports a logging API that works with a variety of built-in and third-party logging providers.
Some key concepts for Azure Monitor include:
- IP Addresses used by Azure Monitor: This exporter sends traces to the configured Azure Monitor Resource using HTTPS. You might need to know IP addresses if the app or infrastructure that you're monitoring is hosted behind a firewall.
Some key concepts for OpenTelemetry include:
OpenTelemetry: OpenTelemetry is a set of libraries used to collect and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior.
Instrumentation: The ability to call the OpenTelemetry API directly by any application is facilitated by instrumentation. A library that enables OpenTelemetry observability for another library is called an Instrumentation Library.
Tracing Signal: Trace refers to distributed tracing. It can be thought of as a directed acyclic graph (DAG) of Spans, where the edges between Spans are defined as parent/child relationship.
Sampling: Sampling is a mechanism to control the noise and overhead introduced by OpenTelemetry by reducing the number of samples of traces collected and sent to the backend.
Metric Signal: OpenTelemetry allows to record raw measurements or metrics with predefined aggregation and a set of attributes (dimensions).
Log Signal: A recording of an event. Typically the record includes a timestamp indicating when the event happened as well as other data that describes what happened, where it happened, etc.
For more information on the OpenTelemetry project, please review the OpenTelemetry Specifications.
Examples
Refer to Program.cs
for a complete demo.
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.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Azure.Core (>= 1.27.0)
- OpenTelemetry (= 1.4.0-rc.3)
- OpenTelemetry.Extensions.PersistentStorage (>= 1.0.0-beta.1)
- System.Text.Json (>= 4.7.2)
NuGet packages (10)
Showing the top 5 NuGet packages that depend on Azure.Monitor.OpenTelemetry.Exporter:
Package | Downloads |
---|---|
Azure.Monitor.OpenTelemetry.AspNetCore
An OpenTelemetry .NET distro that exports to Azure Monitor |
|
Genocs.Tracing
The tracing library to use Azure Service Bus. |
|
Aksio.Cratis.Kernel.Server
Package Description |
|
Reimaginate.Test.Framework
Package Description |
|
Taskurai.Worker
Taskurai Worker SDK |
GitHub repositories (9)
Showing the top 5 popular GitHub repositories that depend on Azure.Monitor.OpenTelemetry.Exporter:
Repository | Stars |
---|---|
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
|
|
microsoft/dotnet-podcasts
.NET reference application shown at .NET Conf featuring ASP.NET Core, Blazor, .NET MAUI, Microservices, Orleans, Playwright, and more!
|
|
Squidex/squidex
Headless CMS and Content Managment Hub
|
|
Azure/durabletask
Durable Task Framework allows users to write long running persistent workflows in C# using the async/await capabilities.
|
|
notifo-io/notifo
Multi channel notification service for collaboration tools, e-commerce, news service and more.
|
Version | Downloads | Last updated |
---|---|---|
1.3.0-beta.1 | 33,285 | 2/8/2024 |
1.2.0 | 493,456 | 1/24/2024 |
1.1.0 | 500,052 | 11/29/2023 |
1.0.0 | 624,431 | 9/20/2023 |
1.0.0-beta.14 | 158,252 | 8/9/2023 |
1.0.0-beta.13 | 196,659 | 7/14/2023 |
1.0.0-beta.12 | 135,312 | 6/6/2023 |
1.0.0-beta.11 | 405,163 | 5/10/2023 |
1.0.0-beta.10 | 93,370 | 4/11/2023 |
1.0.0-beta.9 | 186,203 | 3/14/2023 |
1.0.0-beta.8 | 42,381 | 3/7/2023 |
1.0.0-beta.7 | 97,410 | 2/6/2023 |
1.0.0-beta.6 | 94,257 | 1/9/2023 |
1.0.0-beta.5 | 86,464 | 11/3/2022 |
1.0.0-beta.4 | 337,079 | 10/6/2022 |
1.0.0-beta.3 | 1,036,917 | 10/5/2021 |
1.0.0-beta.2 | 118,048 | 3/5/2021 |