Azureeventhub Receiver
contrib
Maintainers: @atoulme, @cparkins, @dyl10s
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
Overview
Azure resources and services can be configured to send their telemetry to an Azure Event Hub. The Azure Event Hub receiver pulls telemetry from an Azure Event Hub, transforms them, and pushes them through the collector pipeline.Read further
- Diagnostic settings in Azure Monitor
- Stream Azure monitoring data to an event hub and external partner
Configuration
Connection Settings
Eitherconnection or auth must be specified.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection | string | Yes* | Connection string from the Azure portal. Ignored if auth is set. | |
auth | string | Yes* | ID of an authentication extension (AAD, managed identity, or service principal). | |
event_hub.name | string | ** | Event Hub name. Required when using auth. | |
event_hub.namespace | string | ** | Fully qualified namespace (e.g., namespace.servicebus.windows.net). Required when using auth. |
connection or auth is required.** Required when using
auth.
Consumer Settings
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
group | string | No | $Default | Consumer group to read from. |
partition | string | No | "" | Specific partition to watch. If empty, watches all partitions. |
offset | string | No | "" | Starting offset. Only applicable when partition is set. |
storage | string | No | ID of a storage extension for checkpoint persistence. |
Distributed Consumption Settings
Whenblob_checkpoint_store is set, the receiver uses the Azure SDK Processor to coordinate partition ownership across multiple collector instances via Azure Blob Storage. This is mutually exclusive with partition, offset, and storage.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
blob_checkpoint_store.connection | string | * | Azure Blob Storage connection string. Required when not using auth. | |
blob_checkpoint_store.storage_account_url | string | * | Blob service URL (e.g., https://myaccount.blob.core.windows.net). Required when using auth. | |
blob_checkpoint_store.container_name | string | Yes | Blob container for checkpoint data. Must already exist before starting the collector. |
connection or storage_account_url is required.
Polling Settings
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
max_poll_events | int | No | 100 | Maximum events to retrieve per poll. |
poll_rate | int | No | 5 | Maximum seconds to wait before returning fewer than max_poll_events. |
Data Transformation Settings
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
format | string | No | azure | Message format: azure, raw, or "". See Format section. |
apply_semantic_conventions | bool | No | false | Translate Azure Resource Logs using OpenTelemetry semantic convention attribute names. |
time_formats.logs | []string | No | Custom time formats for logs. Uses Go time layout. Falls back to ISO8601. | |
time_formats.metrics | []string | No | Custom time formats for metrics. | |
time_formats.traces | []string | No | Custom time formats for traces. | |
metric_aggregation | string | No | Set to average to aggregate datapoints as sum/count. By default, creates separate metrics with suffixes (_TOTAL, _MIN, etc.). |
Example Configuration
The simplest configuration uses a connection string from the Azure portal:Advanced Configuration
Azure Auth Extension with Service Principal
Checkpoint Persistence with Storage Extension
This component can persist its state (checkpoint offsets) using the storage extension. This is strongly recommended for production deployments to prevent message reprocessing after collector restarts. Without a storage extension configured, the receiver will start from the latest offset on each restart, potentially missing messages that arrived while the collector was down.Distributed Consumption with Blob Checkpoint Store
Whenblob_checkpoint_store is configured, the receiver automatically:
- Coordinates partition ownership across collector instances via blob leases
- Checkpoints progress to Azure Blob Storage
- Rebalances partitions when instances are added or removed
- The blob container must already exist before starting the collector
- All collector instances must use the same consumer group and container
Custom Time Formats and Partitioning
Known Limitations
Before using this receiver, be aware of the following limitations:Checkpoint Persistence
- Without a configured storage extension, checkpoint state is stored only in memory. If the collector restarts, the receiver will resume from the latest offset, potentially missing messages or reprocessing already-consumed messages.
Format
raw
The “raw” format maps the AMQP properties and data into the attributes and body of an OpenTelemetry LogRecord, respectively. The body is represented as a raw byte array.
[!WARNING]
This format is only supported for Logs. Using raw format with Metrics or Traces pipelines will result in an error.
azure
Logs
The “azure” format extracts the Azure log records from the AMQP message data, parses them, and maps the fields to OpenTelemetry attributes. The table below summarizes the mapping between the Azure common log format and the OpenTelemetry attributes.| Azure | OpenTelemetry |
|---|---|
| callerIpAddress (optional) | network.peer.address (attribute) |
| correlationId (optional) | azure.correlation.id (attribute) |
| category (optional) | azure.category (attribute) |
| durationMs (optional) | azure.duration (attribute) |
| Level (optional) | severity_number, severity_text (field) |
| location (optional) | cloud.region (attribute) |
| — | cloud.provider (attribute) |
| operationName (required) | azure.operation.name (attribute) |
| operationVersion (optional) | azure.operation.version (attribute) |
| properties (optional) | azure.properties (attribute, nested) |
| resourceId (required) | azure.resource.id (resource attribute) |
| resultDescription (optional) | azure.result.description (attribute) |
| resultSignature (optional) | azure.result.signature (attribute) |
| resultType (optional) | azure.result.type (attribute) |
| tenantId (required, tenant logs) | azure.tenant.id (attribute) |
| time or timeStamp (required) | time_unix_nano (time takes precedence) |
| identity (optional) | azure.identity (attribute, nested) |
- JSON does not distinguish between fixed and floating point numbers. All JSON numbers are encoded as doubles.
Metrics
For Metrics the Azure Metric Records are an array of “records” with the following fields, by type of metric. From this data a Metric of type Gauge is created with a Data Points that represents the values for the Metric including: Total, Minimum, Maximum, Average and Count.Platform metric (from Azure resources)
| Azure | Open Telemetry |
|---|---|
| time | time_unix_nano (field) |
| resourceId | azure.resource.id (resource attribute) |
| metricName | |
| timeGrain | start_time_unix_nano (field) |
| total | mapped to datapoint metricName + “_TOTAL” |
| count | mapped to datapoint metricName + “_COUNT” |
| minimum | mapped to datapoint metricName + “_MINIMUM” |
| maximum | mapped to datapoint metricName + “_MAXIMUM” |
| average | mapped to datapoint metricName + “_AVERAGE” |
Application metrics (from Application Insights)
See: https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/appmetrics| Azure | Open Telemetry |
|---|---|
| time | time_unix_nano (field) |
| resourceId | azure.resource.id (resource attribute) |
| Name | (metric name) |
| AppRoleInstance | service.instance.id (resource attribute) |
| AppRoleName | service.name (resource attribute) |
| AppVersion | service.version (resource attribute) |
| SDKVersion | telemetry.sdk.version (resource attribute) |
| ClientCountryOrRegion | cloud.region (resource attribute) |
| ClientOS | os.name (resource attribute) |
| Properties (key/value map) | mapped to resource attributes |
| Sum | mapped to datapoint metricName + “_TOTAL” |
| ItemCount | mapped to datapoint metricName + “_COUNT” |
| Min | mapped to datapoint metricName + “_MINIMUM” |
| Max | mapped to datapoint metricName + “_MAXIMUM” |
Traces
Traces based on Azure Application Insights array of records fromAppRequests & AppDependencies with the following fields.
| Azure | Open Telemetry |
|---|---|
| Time | start_time(time_unix_nano(time)) |
| end_time(start_time + time_unix_nano(durationMs)) | |
| Name | span.name |
| OperationId | trace.id |
| ParentId | span.parentId |
| Id | span.id |
| AppRoleName | service.name |
Configuration
Example Configuration
Last generated: 2026-04-13