This topic explains how to stream Azure Monitor logs and metrics from your Azure subscription to LaunchDarkly’s observability features. This integration allows you to monitor your Azure infrastructure alongside your feature flag data for unified observability.
The integration uses Azure Event Hubs and a serverless Azure Function to forward diagnostic data to LaunchDarkly. An Azure Resource Manager (ARM) template automates the entire setup:
To use the Azure Monitor integration, you need:
To find and copy your LaunchDarkly client-side ID, read View or copy SDK credentials.
The ARM template creates all required infrastructure and deploys the forwarding function automatically.
To deploy the ARM template:
The deployment takes 2-3 minutes. After it completes, the Event Hub and forwarding function are ready to receive data. Copy and save the Event Hub namespace name from the deployment outputs to use when you configure Diagnostic Settings.
The template includes an inline Azure Function that forwards data to LaunchDarkly. To view a readable version of the function source code, read Function code reference below.
After deploying the integration, configure your Azure resources to stream diagnostic data to the Event Hub.
To configure Diagnostic Settings:
launchdarkly-observability.launchdarkly-diagnostics as the Event Hub name.RootManageSharedAccessKey as the Event Hub policy name.Repeat these steps for each Azure resource you want to monitor.
For large environments, use Azure Policy to automatically deploy diagnostic settings to resources as they are created. To learn more, read Create diagnostic settings at scale using Azure Policy in the Microsoft documentation.
The ARM template creates the following Azure resources:
All resource names are auto-generated using a unique suffix derived from your resource group ID.
The template uses a Consumption (serverless) plan for pay-per-execution pricing, which is sufficient for most workloads. You can modify the template to use a different hosting plan based on your requirements. To learn more, read Azure Functions hosting options in the Microsoft documentation.
After deployment, data appears in the LaunchDarkly observability dashboard within 1-2 minutes of configuring Diagnostic Settings.
To view your data:
Log records include attributes such as azure.resourceId, azure.category, and azure.operationName for filtering. Metric records use names following the pattern azure.<metricName>, for example azure.CpuPercentage or azure.Http2xx, and are sent as OTLP histograms with sum, count, min, and max values. Metrics include attributes such as azure.resource.id, azure.namespace, and dimension attributes such as azure.dimension.ActivityName.
All records include a service.name attribute set to azure by default. To distinguish data from multiple Azure subscriptions or environments, change the LAUNCHDARKLY_SERVICE application setting in the Function App to a unique value such as azure-production or azure-staging.
By default, only those Azure resources that use Diagnostic Settings send data to LaunchDarkly. To control data volume, enable Diagnostic Settings only on the resources you want to monitor.
You can also filter within Diagnostic Settings by selecting specific log categories instead of all categories. For example, you might select only AppServiceHTTPLogs and AppServiceConsoleLogs for an App Service, omitting audit and platform logs.
The ARM template deploys a Node.js Azure Function that parses Azure Monitor diagnostic records, separates them into logs and metrics, and forwards both as OTLP JSON to LaunchDarkly’s OpenTelemetry collector at /v1/logs and /v1/metrics. Expand this section to view the function source code.
If data does not appear in LaunchDarkly after configuring Diagnostic Settings:
Verify the Event Hub is receiving data. Open the Event Hub namespace in the Azure Portal and check the Messages chart under Overview. If no messages appear, check your Diagnostic Settings configuration.
Verify the Function App is running. Open the Function App in the Azure Portal and navigate to Functions > ForwardToLaunchDarkly > Monitor for invocation logs. If invocations fail, check the error messages.
Verify the client-side ID. Confirm that the LAUNCHDARKLY_CLIENT_SIDE_ID application setting in the Function App matches your LaunchDarkly environment’s client-side ID.
Check Function App logs. Open the Function App in the Azure Portal and navigate to Log stream under Monitoring to view real-time logs from the function.