Skip to content

Azure Event Hub receiver does not set ObservedTimestamp #36861

Closed
@dentonk

Description

@dentonk

Component(s)

receiver/azureeventhub

What happened?

Description

The Azure Event Hub receiver does not set the the ObservedTimestamp for ingested logs.

Steps to Reproduce

Configure an Otel collector pipeline using the azureeventhub receiver and the file exporter with no additional processing and view the output log records.

Expected Result

Each log record should contain an ObservedTimestamp as described in the logs data model here.

Actual Result

In addition to the body, each log record only contains a timeUnixNano field but not an observedTimeUnixNano, as seen in other log records where the ObservedTimestamp is set.

Collector version

v0.115.0

Environment information

Environment

Docker Desktop 4.36.0 running on Mac OSX M3

OpenTelemetry Collector configuration

receivers:
  azureeventhub/AzureEH:
    connection: Endpoint=<REDACTED>
    format: raw
    group: $$Default
    offset: "-1"
    partition: ""
processors:
exporters:
  file/no_rotation:
    path: /output.log
extensions:
service:
  pipelines:
    logs/pipeline1:
      receivers:
        - azureeventhub/AzureEH
      processors:
      exporters:
        - file/no_rotation

Log output

{
  "resourceLogs":
  [
    {
      "resource":
      {},
      "scopeLogs":
      [
        {
          "scope":
          {},
          "logRecords":
          [
            {
              "timeUnixNano": "1734376978561000000",
              "body":
              {
                "bytesValue": "<REDACTED>"
              },
              "traceId": "",
              "spanId": ""
            }
          ]
        }
      ]
    }
  ]
}

Additional context

No response

Activity

github-actions

github-actions commented on Dec 16, 2024

@github-actions
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Participants

    @dentonk

    Issue actions

      Azure Event Hub receiver does not set ObservedTimestamp · Issue #36861 · open-telemetry/opentelemetry-collector-contrib