Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure Monitor now supports native ingestion of OpenTelemetry Protocol (OTLP) signals, enabling you to send telemetry data directly from OpenTelemetry-instrumented applications to Azure Monitor.
Important
- This feature is a limited preview. Preview features are provided without a service-level agreement and aren't recommended for production workloads.
- For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Note
Overview
Azure Monitor can receive OTLP signals through three ingestion mechanisms:
- OpenTelemetry Collector - Send data directly to Azure Monitor cloud ingestion endpoints from any OTel Collector deployment.
- Azure Monitor Agent (AMA) - Ingest data from applications running on Azure VMs, Virtual Machine Scale Sets, or Azure Arc-enabled servers.
- Azure Kubernetes Service (AKS) add-on - Collect telemetry from containerized applications in AKS clusters.
This article covers the OpenTelemetry Collector and Azure Monitor Agent methods. For AKS deployments, see Enable Azure Monitor OpenTelemetry for Kubernetes clusters.
Prerequisites
- Azure subscription: If you don't have one, create an Azure subscription for free.
- OpenTelemetry SDK instrumented application (any supported language).
- For VMs and Virtual Machine Scale Sets deployments: Azure Monitor Agent version 1.38.1 or higher (Windows) or 1.37.0 or higher (Linux).
- For OpenTelemetry Collector deployments: Collector version 0.132.0 or higher with the Azure Authentication extension.
Set up OTLP data collection
You can configure OTLP data collection in Azure Monitor using one of two approaches. The Application Insights-based approach is recommended for most scenarios as it automates resource creation and enables built-in troubleshooting experiences.
Option 1: Create an Application Insights resource with OTLP support (Recommended)
This method automatically provisions all required Azure resources and configures their relationships, enabling you to use Application Insights for application performance monitoring, distributed tracing, and failure analysis.
Register the Application Insights OTLP preview features and provider:
az feature register --name OtlpApplicationInsights --namespace Microsoft.Insights az feature list -o table --query "[?contains(name, 'Microsoft.Insights/OtlpApplicationInsights')].{Name:name,State:properties.state}" az provider register -n Microsoft.InsightsIn the Azure portal, create a new Application Insights resource.
On the Basics tab, select the Enable OTLP support checkbox.
Complete the resource creation process.
After deployment, navigate to the Overview page of your Application Insights resource.
Locate the OTLP Connection Info section and copy the following values:
- Data Collection Rule (DCR) resource ID
- Endpoint URLs for traces, logs, and metrics (if using OpenTelemetry Collector)
Proceed to Configure your telemetry pipeline.
Option 2: Manual resource orchestration
This option requires you to manually create and configure Data Collection Endpoints (DCE), Data Collection Rules (DCR), and destination workspaces. Use this approach when you need custom configurations or want to reuse existing resources.
Create destination workspaces
If you don't have existing workspaces, create the following resources in the same Azure region:
- Log Analytics workspace (LAW) - Stores log and trace data
- Azure Monitor workspace (AMW) - Stores metrics data
Record the resource IDs of both workspaces for later use.
(Optional) Create an Application Insights resource
To enable Application Insights troubleshooting experiences with your OTLP data:
- Create an Application Insights resource in the same region as your workspaces.
- Clear the Enable OTLP support checkbox to avoid creating duplicate resources.
- Copy the Application Insights resource ID.
Note
If you skip this step, you'll need to modify the ARM template in the next section to remove Application Insights references.
Deploy the Data Collection Endpoint and Rule
In the Azure portal, search for Deploy a custom template and select it.
Select Build your own template in the editor.
Copy the template content from the Azure Monitor Community repository.
Paste the template into the editor and update the parameters with your workspace resource IDs and (optionally) Application Insights resource ID.
Set the location to match your workspace region.
Review and create the deployment.
After deployment completes, navigate to the created DCR and copy its resource ID from the Overview page.
Configure your telemetry pipeline
Choose the configuration method based on your compute environment.
Option 1: Azure Monitor Agent (for Azure VMs, Virtual Machine Scale Sets, and Arc-enabled servers)
The Azure Monitor Agent provides a simplified ingestion path for Azure-hosted and Arc-enabled compute resources.
Deploy Azure Monitor Agent
Install the Azure Monitor Agent using Azure CLI or PowerShell. For detailed instructions, see Install and manage Azure Monitor Agent.
Verify you're installing the minimum required version:
- Windows: Version 1.38.1 or higher
- Linux: Version 1.37.0 or higher
Associate the DCR with your compute resources
Create an association between your Data Collection Rule and the VMs, Virtual Machine Scale Sets, or Arc-enabled servers running your instrumented applications:
- Navigate to your DCR in the Azure portal.
- Select Resources under Configuration.
- Select Add and choose the compute resources to associate.
For programmatic association, see Manage data collection rule associations.
Configure application environment
Set the following configuration in your application environment:
Add the
microsoft.applicationIdresource attribute with the Application Insights connection string application ID (the GUID portion afterInstrumentationKey=).Configure the OpenTelemetry SDK to send to localhost using these ports:
- Metrics: Port 4317 (gRPC)
- Logs and Traces: Port 4319 (gRPC)
Example environment variable configuration:
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317"
export OTEL_RESOURCE_ATTRIBUTES="microsoft.applicationId=<your-application-id>"
Note
The Azure Monitor Agent running on the VM handles authentication and routing to Azure Monitor endpoints.
Option 2: OpenTelemetry Collector
For non-Azure environments or when you need maximum flexibility, configure the OpenTelemetry Collector to send data directly to Azure Monitor endpoints.
Configure Microsoft Entra authentication
The OpenTelemetry Collector requires Microsoft Entra authentication to send data to Azure Monitor.
For Azure VMs and Virtual Machine Scale Sets:
- Enable system-assigned managed identity on your compute resource.
- Assign the Monitoring Metrics Publisher role to the managed identity.
- Leave the
managed_identitysection blank in your collector configuration to use the system-assigned identity.
For non-Azure environments:
Configure the Azure Authentication extension in your collector with an appropriate Entra identity:
extensions:
azureauth/monitor:
managed_identity:
client_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" # Your identity client ID
scopes:
- https://monitor.azure.com/.default
For workload identities, service principals, or other Entra identities, provide the client_id of the identity that will authenticate.
Grant permissions to the Data Collection Rule
The identity used by your collector needs permission to write data to your DCR:
Navigate to your DCR in the Azure portal.
Select Access control (IAM) in the left navigation.
Select Add > Add role assignment.
Select Monitoring Metrics Publisher and select Next.
For Assign access to, select User, group, or service principal.
Select Select members and choose your application or managed identity.
Select Review + assign to save the role assignment.
Construct endpoint URLs
If you created your resources using the Application Insights method, you already have the endpoint URLs from the OTLP Connection Info section. Skip to Update collector configuration.
For manually orchestrated resources, construct the endpoint URLs:
Navigate to your Data Collection Endpoint in the Azure portal.
Select JSON View from the Overview page.
Copy the
logsIngestionandmetricsIngestionendpoint values:"logsIngestion": { "endpoint": "https://<name>.<location>-1.ingest.monitor.azure.com" }, "metricsIngestion": { "endpoint": "https://<name>.<location>-1.metrics.ingest.monitor.azure.com" }Navigate to your Data Collection Rule and copy the Immutable ID from the Overview page.
Construct your endpoint URLs using this pattern:
Metrics endpoint:
https://<metrics-dce-domain>/datacollectionRules/<dcr-immutable-id>/streams/microsoft-otelmetrics/otlp/v1/metricsLogs endpoint:
https://<logs-dce-domain>/datacollectionRules/<dcr-immutable-id>/streams/opentelemetry_logs/otlp/v1/logsTraces endpoint:
https://<logs-dce-domain>/datacollectionRules/<dcr-immutable-id>/streams/opentelemetry_traces/otlp/v1/tracesNote
The traces endpoint uses the logs DCE domain.
Update collector configuration
Configure your OpenTelemetry Collector with the authentication extension and Azure Monitor endpoints. Here's a sample configuration:
receivers:
otlp:
protocols:
grpc:
endpoint: localhost:4317
http:
endpoint: localhost:4318
processors:
batch:
extensions:
azureauth/monitor:
use_default: true
scopes:
- https://monitor.azure.com/.default
exporters:
otlphttp/azuremonitor:
traces_endpoint: "https://<logs-dce-domain>/datacollectionRules/<dcr-immutable-id>/streams/opentelemetry_traces/otlp/v1/traces"
logs_endpoint: "https://<logs-dce-domain>/datacollectionRules/<dcr-immutable-id>/streams/opentelemetry_logs/otlp/v1/logs"
metrics_endpoint: "https://<metrics-dce-domain>/datacollectionRules/<dcr-immutable-id>/streams/microsoft-otelmetrics/otlp/v1/metrics"
auth:
authenticator: azureauth/monitor
service:
extensions:
- azureauth/monitor
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/azuremonitor]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/azuremonitor]
logs:
receivers: [otlp]
processors: [batch]
exporters: [otlphttp/azuremonitor]
Limitations
The following Azure regions aren't supported during the preview:
- Austria East
- Chile Central
- Indonesia Central
- Malaysia West
- Mexico Central
- New Zealand North
- North Central US
- Poland Central
- Qatar Central
- West India
Support
Reach out to us at otel@microsoft.com with your experiences, questions, or suggestions.