Skip to main content

Announcing Azure Monitor OpenTelemetry Distro

Our goal is to make Azure the most observable cloud. To that end, we are refactoring Azure’s native observability platform to be based on OpenTelemetry, an industry standard for instrumenting applications and transmitting telemetry.

These investments include plans to retrofit the Azure Monitor ingress and all our Azure SDKs to use OTLP for traces and metrics, making it possible to use any language OpenTelemetry supports on Azure. As part of these investments, we have strong support for observability in .NET, where telemetry can be collected using the OpenTelemetry SDK for .NET.

One advantage of OpenTelemetry is that it’s vendor-neutral. For example, the exporter model enables the data to be used with a variety of APM systems, including open-source projects such as Prometheus, Grafana, Jaeger & Zipkin, and commercial products such as Azure’s native monitoring solution, Azure Monitor.

When it comes to Azure’s native observability solution, Azure Monitor, we want to make it as easy as possible for you to enable OpenTelemetry. The “Azure Monitor OpenTelemetry Distro” is your one-stop-shop to power Azure Monitor. While we are currently focused on lighting up Application Insights, we plan to expand this distro to cover other scenarios within Azure Monitor in the future, such as piping special purpose logs/events to your own custom-defined table in Log Analytics.

OpenTelemetry and .NET can have different terminology for the same things – Open Telemetry is a cross platform standard where vendors create “Distros” for multiple languages. While Distro is often thought of in the context of Linux, in this case, the term “Distro” is equivalent to library or package that bundles together OpenTelemetry components. For .NET this distro is shipped as the Nuget Package Azure.Monitor.OpenTelemetry.AspNetCore and is backed by a github project.

Introducing ILogger Correlation

Before we get into the details of the Azure Monitor OpenTelemetry Distro, we want to catch you up on how far OpenTelemetry has come on .NET:

  • In March 2021, we announced that OpenTelemetry Tracing APIs would be part of .NET 5.
  • In June 2021, we announced that OpenTelemetry metrics API would be part of .NET 6.

With the help of the OpenTelemetry SDK, logging using ILogger now supports the automatic capturing of Activity IDs for correlation to traces, so all three signal types are now available for full end-to-end observability. The video shows how to see this correlation in Application Insights.

How to make OpenTelemetry easier to use on Azure?

One of the challenges for observability solutions like Azure Monitor is making it easy for customers to get started with OpenTelemetry.

There’s an initial learning curve where application developers must teach themselves the basics of OpenTelemetry, consider which instrumentation libraries they need, assess which configurations matter to their scenario, and determine whether any vendor-specific processors are required for interoperability with their existing APM.

Setting all this up requires learning lots of new concepts, and developers are forced to keep track of several moving parts.

In addition, OpenTelemetry provides a rich API surface with dozens of instrumentation libraries to enable the wide range of observability scenarios customers may need. We received feedback from developers that they want a simpler entry point to follow that enables the best practices for monitoring their ASP.NET core web applications with Azure.

Introducing the Azure Monitor OpenTelemetry Distro

To make this enablement easier, the Distro includes helper methods that enable Azure Monitor Experiences including Application Insights with just a single line of code.

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddOpenTelemetry().UseAzureMonitor();

var app = builder.Build();

app.Run();

With the single line of code, the distro includes everything you need for a first-class Azure experience, including:

  • Popular instrumentation libraries for auto-collection of traces, metrics, and logs
  • Correlated traces when using Application Insights SDKs in other parts of your service
  • Azure Active Directory (AAD) Authentication
  • Application Insights Standard Metrics
  • Automatic detection of Azure Resources to auto-populate key experiences.

In the months to come, we plan to add more features to the distro including Live Metrics. With OpenTelemetry semantic conventions reaching stability, Azure SDK instrumentation will provide insights into your app’s communication with Azure Services. This will bring observability to messaging scenarios.

As we adapt our backend systems, you’ll get the full benefits of OpenTelemetry including exemplars and histograms. Over time, we hope to contribute back some of these unique Azure-Specific features to OpenTelemetry so they are part of the broader community, but our commitment is to get the best to our customers as soon as possible via the Distro.

In addition to ASP.NET core, we are also releasing Azure Monitor OpenTelemetry Distros in JavaScript (Node.js) and Python. We have had an OpenTelemetry-based Java Distro in production for several years, and it’s been encouraging to see strong adoption of Java Observability on Azure Monitor.

Open and Extensible Design

Even though this is a “vendor-specific wrapper”, our design is open and extensible. Our goal is ease-of-use; not vendor-lock. It follows the layered approach for telemetry APIs in .NET.

Diagram showing the layered approach of the Azure Monitor OpenTelemetry Distro

For example, let’s say down the road you want to add a second exporter. You can instantiate one alongside Azure Monitor Exporter. You can also add community instrumentation libraries not already bundled in with the Distro to expand data collection.

When to use the Distro versus the Exporter?

For the majority of ASP.NET Core customers, we anticipate the distro will be attractive because monitoring can quickly become complicated, and we want to take the guess work out of it. However, there will be some customers who want to touch all the knobs and levers, and for these customers the Azure Monitor exporter is still available as a standalone component. For all other application types besides ASP.NET Core, the exporter remains our recommended solution for now.

How do I get started?

Getting started with the Distro is simple. It’s only a few steps documented on Azure Monitor Application Insights OpenTelemetry Enablement Official Docs. Check it out and let us know what you think. Join the chat at the bottom of the page, open an issue on Github, or send us some feedback at OTel@microsoft.com.

The post Announcing Azure Monitor OpenTelemetry Distro appeared first on .NET Blog.



source https://devblogs.microsoft.com/dotnet/azure-monitor-opentelemetry-distro/

Comments

Popular posts from this blog

Fake CVR Generator Denmark

What Is Danish CVR The Central Business Register (CVR) is the central register of the state with information on all Danish companies. Since 1999, the Central Business Register has been the authoritative register for current and historical basic data on all registered companies in Denmark. Data comes from the companies' own registrations on Virk Report. There is also information on associations and public authorities in the CVR. As of 2018, CVR also contains information on Greenlandic companies, associations and authorities. In CVR at Virk you can do single lookups, filtered searches, create extracts and subscriptions, and retrieve a wide range of company documents and transcripts. Generate Danish CVR For Test (Fake) Click the button below to generate the valid CVR number for Denmark. You can click multiple times to generate several numbers. These numbers can be used to Test your sofware application that uses CVR, or Testing CVR APIs that Danish Govt provide. Generate

How To Iterate Dictionary Object

Dictionary is a object that can store values in Key-Value pair. its just like a list, the only difference is: List can be iterate using index(0-n) but not the Dictionary . Generally when we try to iterate the dictionary we get below error: " Collection was modified; enumeration operation may not execute. " So How to parse a dictionary and modify its values?? To iterate dictionary we must loop through it's keys or key - value pair. Using keys

How To Append Data to HTML5 localStorage or sessionStorage?

The localStorage property allows you to access a local Storage object. localStorage is similar to sessionStorage. The only difference is that, while data stored in localStorage has no expiration time untill unless user deletes his cache, data stored in sessionStorage gets cleared when the originating window or tab get closed. These are new HTML5 objects and provide these methods to deal with it: The following snippet accesses the current domain's local Storage object and adds a data item to it using Storage.setItem() . localStorage.setItem('myFav', 'Taylor Swift'); or you can use the keyname directly as : localStorage.myFav = 'Taylor Swift'; To grab the value set in localStorage or sessionStorage, we can use localStorage.getItem("myFav"); or localStorage.myFav There's no append function for localStorage or sessionStorage objects. It's not hard to write one though.The simplest solution goes here: But we can kee