Data Collection Basics of Azure Monitor Application Insights

In the following sections, we cover some data collection basics of Azure Monitor Application Insights.

Instrumentation Options

At a basic level, "instrumenting" is simply enabling an application to capture telemetry.

There are two methods to instrument your application:

  • Automatic instrumentation (autoinstrumentation)
  • Manual instrumentation

Autoinstrumentation enables telemetry collection through configuration without touching the application's code. Although it's more convenient, it tends to be less configurable. It's also not available in all languages. See Autoinstrumentation supported environments and languages. When autoinstrumentation is available, it's the easiest way to enable Azure Monitor Application Insights.

Tip

Currently, Microsoft Entra authentication is not available with autoinstrumentation. If you require Microsoft Entra auth, you'll need to use manual instrumentation.

Manual instrumentation is coding against the Application Insights or OpenTelemetry API. In the context of a user, it typically refers to installing a language-specific SDK in an application. There are two options for manual instrumentation:

While we see OpenTelemetry as our future direction, we have no plans to stop collecting data from older SDKs. We still have a way to go before our Azure OpenTelemetry Distros reach feature parity with our Application Insights SDKs. In many cases, customers continue to choose to use Application Insights SDKs for quite some time.

Important

"Manual" doesn't mean you'll be required to write complex code to define spans for distributed traces, although it remains an option. Instrumentation Libraries packaged into our Distros enable you to effortlessly capture telemetry signals across common frameworks and libraries. We're actively working to instrument the most popular Azure Service SDKs using OpenTelemetry so these signals are available to customers who use the Azure Monitor OpenTelemetry Distro.

Telemetry Types

Telemetry, the data collected to observe your application, can be broken into three types or "pillars":

  • Distributed Tracing
  • Metrics
  • Logs

A complete observability story includes all three pillars, and Application Insights further breaks down these pillars into tables based on our data model. Our Application Insights SDKs or Azure Monitor OpenTelemetry Distros include everything you need to power Application Performance Monitoring on Azure. The package itself is free to install, and you only pay for the data you ingest in Azure Monitor.

The following sources explain the three pillars:

Telemetry Routing

There are two ways to send your data to Azure Monitor (or any vendor):

  • Via a direct exporter
  • Via an agent

A direct exporter sends telemetry in-process (from the application's code) directly to the Azure Monitor ingestion endpoint. The main advantage of this approach is onboarding simplicity.

The currently available Application Insights SDKs and Azure Monitor OpenTelemetry Distros rely on a direct exporter.

Note

For Azure Monitor's position on the OpenTelemetry-Collector, see the OpenTelemetry FAQ.

Tip

If you are planning to use OpenTelemetry-Collector for sampling or additional data processing, you may be able to get these same capabilities built-in to Azure Monitor. Customers who have migrated to Workspace-based Application Insights can benefit from Ingestion-time Transformations. To enable, follow the details in the tutorial, skipping the step that shows how to set up a diagnostic setting since with Workspace-centric Application Insights this is already configured. If you’re filtering less than 50% of the overall volume, it’s no additional cost. After 50%, there is a cost but much less than the standard per GB charge.

OpenTelemetry

Microsoft is excited to embrace OpenTelemetry as the future of telemetry instrumentation. You, our customers, asked for vendor-neutral instrumentation, and we're pleased to partner with the OpenTelemetry community to create consistent APIs and SDKs across languages.

Microsoft worked with project stakeholders from two previously popular open-source telemetry projects, OpenCensus and OpenTracing. Together, we helped to create a single project, OpenTelemetry. OpenTelemetry includes contributions from all major cloud and Application Performance Management (APM) vendors and lives within the Cloud Native Computing Foundation (CNCF). Microsoft is a Platinum Member of the CNCF.

For terminology, see the glossary in the OpenTelemetry specifications.

Some legacy terms in Application Insights are confusing because of the industry convergence on OpenTelemetry. The following table highlights these differences. OpenTelemetry terms are replacing Application Insights terms.

Application Insights OpenTelemetry
Autocollectors Instrumentation libraries
Channel Exporter
Codeless / Agent-based Autoinstrumentation
Traces Logs
Requests Server Spans
Dependencies Other Span Types (Client, Internal, etc.)
Operation ID Trace ID
ID or Operation Parent ID Span ID

Troubleshooting

Not working? Check out the troubleshooting page for ASP.NET Core.

Support

Select a tab for the language of your choice to discover support options.

OpenTelemetry feedback

To provide feedback:

Frequently asked questions

Where can I find a list of Application Insights SDK versions and their names?

A list of SDK versions and names is hosted on GitHub. For more information, see SDK Version.

Next steps

Select your enablement approach:

Check out the Azure Monitor Application Insights FAQ and OpenTelemetry FAQ for more information.