Skip to main content

Azureblob Receiver

Status Available in: contrib Maintainers: @eedorenko, @mx-psi, @dyl10s Source: opentelemetry-collector-contrib

Supported Telemetry

Logs Traces

Overview

This receiver reads logs and trace data from Azure Blob Storage.

Modes of Operation

The receiver supports two modes of operation:
  1. Event Hub mode (recommended): Uses Azure Event Hub to receive notifications when new blobs are created. This is more efficient as it processes blobs immediately upon creation.
  2. Polling mode: Periodically polls the blob containers for new blobs. Use this mode when Event Hub is not available or not desired. Blobs are processed and deleted every 10 seconds.
The mode is automatically selected based on whether event_hub.endpoint is configured.

Configuration

The following settings can be optionally configured:
  • event_hub:
    • endpoint: (no default): Azure Event Hub endpoint triggering on the Blob Create event. If not specified, the receiver uses polling mode.
  • auth (default = connection_string): Specifies the used authentication method. Supported values are connection_string, service_principal, default.
  • cloud (default = “AzureCloud”): Defines which Azure Cloud to use when using the service_principal authentication method. Value is either AzureCloud or AzureUSGovernment.
  • logs:
    • container_name: (default = “logs”): Name of the blob container with the logs
  • traces:
    • container_name: (default = “traces”): Name of the blob container with the traces
Authenticating using a connection string requires configuration of the following additional setting:
  • connection_string: Azure Blob Storage connection key, which can be found in the Azure Blob Storage resource on the Azure Portal.
Authenticating using service principal requires configuration of the following additional settings:
  • service_principal:
    • tenant_id
    • client_id
    • client_secret
  • storage_account_url: Azure Storage Account url
The service principal method also requires the Storage Blob Data Contributor role on the logs and traces containers.

Example configurations

Using Event Hub mode with connection string authentication:
receivers:
  azure_blob:
    connection_string: DefaultEndpointsProtocol=https;AccountName=accountName;AccountKey=+idLkHYcL0MUWIKYHm2j4Q==;EndpointSuffix=core.windows.net
    event_hub:
      endpoint: Endpoint=sb://oteldata.servicebus.windows.net/;SharedAccessKeyName=otelhubbpollicy;SharedAccessKey=mPJVubIK5dJ6mLfZo1ucsdkLysLSQ6N7kddvsIcmoEs=;EntityPath=otellhub
Using Event Hub mode with service principal authentication:
receivers:
  azure_blob:
    auth: service_principal
    service_principal:
      tenant_id: "${tenant_id}"
      client_id: "${client_id}"
      client_secret: "${env:CLIENT_SECRET}"
    storage_account_url: https://accountName.blob.core.windows.net
    event_hub:
      endpoint: Endpoint=sb://oteldata.servicebus.windows.net/;SharedAccessKeyName=otelhubbpollicy;SharedAccessKey=mPJVubIK5dJ6mLfZo1ucsdkLysLSQ6N7kddvsIcmoEs=;EntityPath=otellhub
Using polling mode (no Event Hub):
receivers:
  azure_blob:
    connection_string: DefaultEndpointsProtocol=https;AccountName=accountName;AccountKey=+idLkHYcL0MUWIKYHm2j4Q==;EndpointSuffix=core.windows.net

Behavior

In Event Hub mode, the receiver subscribes to blob events published by Azure Blob Storage and handled by Azure Event Hub. When it receives a Blob Create event, it reads the logs or traces from the corresponding blob and deletes it after processing. In polling mode, the receiver periodically lists all blobs in the configured containers, processes each blob, and deletes it after processing.

Configuration

Example Configuration

receivers:
  azure_blob:
    connection_string: DefaultEndpointsProtocol=https;AccountName=accountName;AccountKey=+idLkHYcL0MUWIKYHm2j4Q==;EndpointSuffix=core.windows.net
  azure_blob/2:
    auth: service_principal
    service_principal:
      tenant_id: mock-tenant-id
      client_id: mock-client-id
      client_secret: mock-client-secret
    storage_account_url: https://accountName.blob.core.windows.net
    logs:
      container_name: logs
    traces:
      container_name: traces

processors:
  nop:

exporters:
  nop:

service:
  pipelines:
    traces:
      receivers: [azure_blob]
      processors: [nop]
      exporters: [nop]
    logs:
      receivers: [azure_blob]
      processors: [nop]
      exporters: [nop]

Last generated: 2026-04-13