Skip to content

[receiver/azuremonitor] failed to start "azuremonitor" receiver: secret can't be empty string #40872

Closed
@dosingleton-gs

Description

@dosingleton-gs

Component(s)

receiver/azuremonitor

What happened?

Description

When configuring the azuremonitor receiver using the service principal setup for the azureauthextension the azuremonitor receiver does not start.

Steps to Reproduce

Run the following config, using an azure service principal setup in your env.

docker-compose.yml

services:
  otel-collector:
    image: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest
    volumes:
      - ./configs/otel-collector-config.yaml:/etc/otelcol-contrib/config.yaml
    ports:
      - 13133:13133 # health_check extension
      - 4317:4317 # OTLP gRPC receiver
      - 4318:4318 # OTLP http receiver
    networks:
      - observability-network
    environment:
      - AZURE_CLIENT_ID=${AZURE_CLIENT_ID}
      - AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET}
      - AZURE_TENANT_ID=${AZURE_TENANT_ID}
      - AZURE_SUBSCRIPTION_ID=${AZURE_SUBSCRIPTION_ID}

networks:
  observability-network:
    driver: bridge

Expected Result

The collector to start along with the azuremonitorreceiver.

Actual Result

Error:

Error: cannot start pipelines: failed to start "azuremonitor" receiver: secret can't be empty string

Collector version

v0.128.0

Environment information

Environment

OS: Windows (Host), Docker via WSL (Ubuntu)

OpenTelemetry Collector configuration

extensions:
  health_check: {}
  azureauth:
    service_principal:
      tenant_id: ${AZURE_TENANT_ID}
      client_id: ${AZURE_CLIENT_ID}
      client_secret: ${AZURE_CLIENT_SECRET}

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318
  azuremonitor:
    auth: 
      authenticator: azureauth
    use_batch_api: true
    discover_subscriptions: true

processors:
  batch:

exporters:
  debug:
    verbosity: detailed

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [debug]
    metrics:
      receivers: [otlp, azuremonitor]
      exporters: [debug]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [debug]

  extensions: [health_check, azureauth]

Log output

Error: cannot start pipelines: failed to start "azuremonitor" receiver: secret can't be empty string

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions