Quest 5 – I want to add conversation memory to my app
June 19, 2025How to Configure Conditional Access Reauthentication in Azure PIM
June 19, 2025Why OpenTelemetry?
As modern applications become more distributed and complex, robust observability is no longer optional—it is essential. Organizations need a consistent way to understand how workflows are performing, trace failures, and optimize end-to-end execution.
OpenTelemetry provides a unified, vendor-agnostic framework for collecting telemetry data—logs, metrics, and traces—across different services and infrastructure layers. It simplifies monitoring and makes it easier to integrate with a variety of observability backends such as Azure Monitor, Grafana Tempo, Jaeger, and others.
For Logic Apps—especially when deployed in hybrid or on-premises scenarios—OpenTelemetry is a powerful addition that elevates diagnostic capabilities beyond the default Application Insights telemetry.
What is OpenTelemetry?
OpenTelemetry (OTel) is an open-source observability framework under the Cloud Native Computing Foundation (CNCF) that provides a unified standard for generating, collecting, and exporting telemetry data such as logs, metrics, and traces.
By abstracting away vendor-specific instrumentation and enabling interoperability across various tools and platforms, OpenTelemetry empowers developers and operators to gain deep visibility into distributed systems—regardless of the underlying infrastructure or language stack.
In the context of Azure Logic Apps, OpenTelemetry support enables standardized, traceable telemetry that can integrate seamlessly with a wide range of observability solutions. This helps teams monitor, troubleshoot, and optimize workflows with more precision and flexibility.
How to Configure from Visual Studio Code?
To configure OpenTelemetry for a Logic App (Standard) project from Visual Studio Code:
- Locate the host.json file in the root of your Logic App project.
- Enable OpenTelemetry by adding “telemetryMode”: “OpenTelemetry” at the root level of the file.{
“version”: “2.0”,
“extensionBundle”: {
“id”: “Microsoft.Azure.Functions.ExtensionBundle.Workflows”,
“version”: “[1.*, 2.0.0)”
},
“telemetryMode”: “OpenTelemetry”
}
Define the following application settings in local.settings.json or within your CI/CD deployment pipeline:
- OTEL_EXPORTER_OTLP_ENDPOINT: The OTLP exporter endpoint URL where the telemetry data should be sent.
- OTEL_EXPORTER_OTLP_HEADERS (optional): A list of headers to apply to all outgoing data. This is commonly used to pass authentication keys or tokens to your observability backend.
If your endpoint requires additional OpenTelemetry-related settings, include those in the application settings as well. Refer to the official OTLP Exporter Configuration documentation for details.
How to Configure OpenTelemetry from Azure Portal? – Standard Logic Apps
To enable OpenTelemetry support for a Standard Logic App hosted using either a Workflow Standard Plan or App Service Environment v3, follow the steps below:
1. Update the host.json File
- In the Azure portal, navigate to your Standard Logic App resource.
- In the left-hand menu, under Development Tools, select Advanced Tools > Go. This opens the Kudu console.
- In Kudu, from the Debug Console menu, select CMD, and navigate to:
site > wwwroot - Locate and open the host.json file in a text editor.
- Add the following configuration at the root level of the file to enable OpenTelemetry, then save and close the editor.{
“version”: “2.0”,
“extensionBundle”: {
“id”: “Microsoft.Azure.Functions.ExtensionBundle.Workflows”,
“version”: “[1.*, 2.0.0)”
},
“telemetryMode”: “OpenTelemetry”
}
2. Configure App Settings for Telemetry Export
- Still within your Logic App resource, go to Settings > Environment Variables and select App settings.
- Add the following key-value pairs:
App Setting Description OTEL_EXPORTER_OTLP_ENDPOINT The OTLP (OpenTelemetry Protocol) endpoint URL where telemetry data will be exported. For example: https://otel.your-observability-platform.com OTEL_EXPORTER_OTLP_HEADERS (Optional) Any custom headers required by your telemetry backend, such as an Authorization token (e.g., Authorization=Bearer ).
- Select Apply to save the configuration.
How to Configure OpenTelemetry from Azure Portal? – Hybrid Logic Apps
To enable OpenTelemetry support for a Standard Logic App using the Hybrid hosting option, follow the steps below. This configuration enables telemetry collection and export from an on-premises deployment, using environment variables and local file system access.
1. Modify host.json on the SMB Share
- On your on-premises file share (SMB), navigate to the root directory of your Logic App project.
- Locate the host.json file.
- Add the following configuration to enable OpenTelemetry and save the file.{
“version”: “2.0”,
“extensionBundle”: {
“id”: “Microsoft.Azure.Functions.ExtensionBundle.Workflows”,
“version”: “[1.*, 2.0.0)”
},
“telemetryMode”: “OpenTelemetry”
}
2. Configure Environment Variables in Azure Portal
- Go to the Azure Portal and navigate to your Standard Logic App (Hybrid) resource.
- From the left-hand menu, select Settings > Containers, then click on Edit and deploy.
- In the Edit a container pane, select Environment variables, and then click Add to define the following:
Name Source Value Description OTEL_EXPORTER_OTLP_ENDPOINT Manual The OTLP exporter endpoint URL where telemetry should be sent. Example: https://otel.yourbackend.com OTEL_EXPORTER_OTLP_HEADERS (Optional) Manual Custom headers (e.g., Authorization=Bearer ) required by your observability backend.
- Once you’ve added all necessary settings, click Save.
Example of Endpoint Configuration & How to Check Logs
To export telemetry data using OpenTelemetry, configure the following environment variables in your Logic App’s application settings or container environment:
Name | Source | Value | Description |
---|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | Manual Entry | https://otel.kloudmate.com:4318 | The OTLP receiver endpoint for your observability backend. |
OTEL_EXPORTER_OTLP_HEADERS | Manual Entry | Authorization= | Used to authenticate requests to the telemetry backend. |
OTEL_EXPORTER_OTLP_PROTOCOL | Manual Entry | http/protobuf | Protocol used for exporting telemetry (KloudMate supports gRPC/HTTP). |
In this example, we are using KloudMate as the destination for telemetry data. Once correctly configured, your Logic App will begin exporting telemetry data to KloudMate as shown below:
Limitations and Troubleshooting Steps
Current Limitations
- Supported trigger types for OpenTelemetry in Logic Apps are:
- HTTP
- Service Bus
- Event Hub
- Exporting metrics is not currently supported.
Troubleshooting Steps
- No traces received:
- Validate OTEL_EXPORTER_OTLP_ENDPOINT URL and port availability.
- Ensure outbound traffic to observability backend is permitted.
- Authentication issues:
- Review and correct header values in OTEL_EXPORTER_OTLP_HEADERS.
References
Set up and view enhanced telemetry for Standard workflows – Azure Logic Apps | Microsoft Learn