Following Microsoft’s recent GA announcement for OpenTelemetry (OTel) support, we are excited to announce support for Exemplars for customers instrumenting metrics with Prometheus or OpenTelemetry and traces using OpenTelemetry, enhancing Azure Monitor’s integrated observability experience for cloud-native applications.
Modern cloud-native applications generate enormous volumes of telemetry. Metrics help teams detect that something is wrong, but traces explain why. Exemplars bridge these two worlds by attaching trace references directly to metric data points, making it dramatically easier to pivot from a spike in latency or errors to the exact distributed trace responsible for the issue.
With Azure Monitor, customers can now ingest metrics with exemplars and visualize them in Azure Managed Grafana. This enables seamless correlation between metrics and traces, helping engineering teams troubleshoot issues faster and reduce mean time to resolution (MTTR).
Why Exemplars Matter
Traditional monitoring workflows often require users to manually correlate data across multiple systems. Exemplars simplify this workflow by embedding trace context directly into metric samples. For example, if a latency metric spikes at a specific timestamp, the exemplar associated with that data point can link directly to the distributed trace responsible for the outlier.
This provides several benefits:
- Faster root cause analysis
- Quicker transition from aggregate metrics to request-level details
- Simplified debugging workflows for SRE and platform teams
- Better observability experiences for microservices and distributed applications
Unified Observability with Azure Monitor
With Azure Monitor and Azure Managed Grafana, you can now:
- Ingest OTLP or Prometheus metrics with exemplars into Azure Monitor Workspace
- Store and analyze traces in Azure Monitor Application Insights
- Visualize exemplar markers directly in Grafana charts
- Navigate from a metric spike to the exact distributed trace associated with that data point
By combining these signals in a single observability platform, organizations can correlate infrastructure health, application behavior, and request traces without context switching between tooling.
How It Works
Once metrics, exemplars, and traces are ingested into Azure Monitor, Azure Managed Grafana can consume exemplar information from the configured Prometheus data source. When exemplars are enabled in Grafana dashboards, users will see markers associated with individual metric data points. Selecting an exemplar opens the associated trace in Azure Monitor, providing end-to-end diagnostic context.
Getting Started
Setup data ingestion:
- Instrument your application to emit OpenTelemetry traces, OpenTelemetry or Prometheus metrics with exemplars, and enable ingestion of the same to Azure Monitor using OpenTelemetry Collector. Follow the instructions in Ingest OTLP Data into Azure Monitor with OTel Collector - Azure Monitor | Microsoft Learn. After this step, you will have the Log Analytics Workspace, Azure Monitor Workspace and Application Insights resources all set up to store the telemetry data.
- Create an Azure Managed Grafana instance and connect it with the Azure Monitor Workspace by navigating to your Azure Monitor Workspace in the Azure portal and then clicking on “Linked Grafana workspaces”. To learn more, see Manage an Azure Monitor workspace - Azure Monitor | Microsoft Learn
- Optionally, enable Azure Managed Prometheus on your AKS cluster or use remote-write and configure it to use the same Azure Monitor Workspace to centralize infrastructure and application metrics.
Enable Exemplars in Azure Managed Grafana:
After setting up the data ingestion, ensure that logs and traces are flowing into Log Analytics Workspace, and metrics are flowing into Azure Monitor Workspace.
Step 1: Enable Exemplars on Prometheus Data Source in Azure Managed Grafana
- Navigate to Connections -> Data Sources in Azure Managed Grafana. Since you have connected Azure Managed Grafana to Azure Monitor Workspace, you will see the data source (Managed_Prometheus_<AMW-Name>) already configured. If the data source is not configured, follow the steps here to add your Azure Monitor Workspace as a data source.
- Open the data source configuration.
- Click Add Exemplars to enable exemplar support.
Step 2: Configure Trace Linking with Azure Monitor
- In the exemplar configuration section, toggle Internal Link to On.
- Select Azure Monitor as the data source.
- In the Label Name, enter the name of the field in the labels object that should be used to get the trace id, eg. trace_id.
- Click Save & Test.
This configuration enables direct navigation from exemplar markers in Grafana charts to the associated traces stored in Azure Monitor. Azure Managed Grafana also supports trace correlation from other solutions like Jaeger etc. To use your trace solution, use the appropriate links.
Step 3: Enable Exemplars in Dashboards
- Navigate to a Grafana dashboard that uses your configured Prometheus data source.
- Open the panel options for a metrics chart.
- Toggle Exemplars to On.
Once enabled, exemplar markers will appear on supported metric visualizations. Clicking on it will show exemplar details along with an option to open the corresponding distributed trace in Azure Monitor.
To learn more, visit https://aka.ms/azmon-exemplars