Skip to content

[receiver/azureeventhub] Unhandled Time Grain when adding metrics pipeline #39329

Closed
@sigurdfalk

Description

@sigurdfalk

Component(s)

receiver/azureeventhub

What happened?

Description

When enabling a metrics pipeline for the receiver, the logs are filled with "Unhandled Time Grain".

Our logs pipeline is working just fine. The warnings started immediately after enabling the metrics pipeline, even before we had enabled any metrics in our diagnostic settings. When enabling metrics in diagnostig settings, we can query metrics in Grafana trhough Mimir as expected. We have currently enabled AKS, Azure Application Gateway and Azure PostgreSQL Flexible Server and we see metrics from all of these.

Steps to Reproduce

Expected Result

Actual Result

Collector version

0.117.0

Environment information

Environment

OS: AzureLinux on AKS
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

config:
    exporters:
      debug:
        verbosity: detailed
      otlphttp/loki:
        ...
      otlphttp/mimir:
        ...
    extensions:
      file_storage:
        directory: /var/lib/otelcol
      health_check:
        endpoint: 0.0.0.0:13134
    processors:
      batch: {}
      memory_limiter:
        check_interval: 5s
        limit_percentage: 80
        spike_limit_percentage: 25
      transform/azureeventhub-receiver:
        error_mode: ignore
        log_statements:
        - context: log
          statements:
          - merge_maps(cache, ParseJSON(attributes["azure.properties"]["log"]), "upsert")
            where attributes["azure.category"] == "kube-audit" or attributes["azure.category"]
            == "kube-audit-admin"
          - set(attributes["azure.properties"]["log"], cache) where attributes["azure.category"]
            == "kube-audit" or attributes["azure.category"] == "kube-audit-admin"
          - set(body, attributes["azure.properties"])
          - delete_key(attributes, "azure.properties")
          - set(resource.attributes["azure.category"], attributes["azure.category"])
          - set(resource.attributes["azure.resource.name"], resource.attributes["azure.resource.id"])
          - replace_pattern(resource.attributes["azure.resource.name"], "^.+\\/(.+)",
            "$$1")
        metric_statements:
        - context: datapoint
          statements:
          - set(attributes["azure.resource.id"], resource.attributes["azure.resource.id"])
          - set(attributes["azure.resource.name"], resource.attributes["azure.resource.id"])
          - replace_pattern(attributes["azure.resource.name"], "^.+\\/(.+)", "$$1")
    receivers:
      azureeventhub/norwayeast:
        connection: ${AZURE_EVENTHUB_CONNECTION_NORWAYEAST}
        format: azure
        group: otel_collector_consumer_group
        storage: file_storage
      azureeventhub/westeurope:
        connection: ${AZURE_EVENTHUB_CONNECTION_WESTEUROPE}
        format: azure
        group: otel_collector_consumer_group
        storage: file_storage
    service:
      extensions:
      - health_check
      - file_storage
      pipelines:
        logs/eventhub:
          exporters:
          - otlphttp/loki
          processors:
          - memory_limiter
          - batch
          - transform/azureeventhub-receiver
          receivers:
          - azureeventhub/norwayeast
          - azureeventhub/westeurope
        metrics/eventhub:
          exporters:
          - otlphttp/mimir
          processors:
          - memory_limiter
          - batch
          - transform/azureeventhub-receiver
          receivers:
          - azureeventhub/norwayeast
      telemetry:
        logs:
          encoding: json
          level: info
        metrics:
          address: 0.0.0.0:8889
          level: detailed

Log output

{
  "level": "warn",
  "ts": "2025-04-11T06:54:46.629Z",
  "caller": "[email protected]/azureresourcemetrics_unmarshaler.go:103",
  "msg": "Unhandled Time Grain",
  "kind": "receiver",
  "name": "azureeventhub/norwayeast",
  "data_type": "metrics",
  "timegrain": ""
}

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