Skip to content

fix(opentelemetry source): emit component_received_event* metrics when use_otlp_decoding is enabled#24480

Merged
thomasqueirozb merged 4 commits intomasterfrom
fix-otlp-decoding-metrics
Jan 12, 2026
Merged

fix(opentelemetry source): emit component_received_event* metrics when use_otlp_decoding is enabled#24480
thomasqueirozb merged 4 commits intomasterfrom
fix-otlp-decoding-metrics

Conversation

@thomasqueirozb
Copy link
Contributor

@thomasqueirozb thomasqueirozb commented Jan 9, 2026

Summary

Fixes missing component_received_events_total metric when use_otlp_decoding: true is enabled in the OpenTelemetry HTTP source.

The implementation of parse_with_deserializer now does the same thing that decode_metrics_body does when use_otlp_decoding is set to false. Now both functions are emitting metrics properly and in a similar manner.

Vector configuration

sources:
  open_telemetry_raw:
    grpc:
      address: 0.0.0.0:4320
    http:
      address: 0.0.0.0:4319
    type: opentelemetry
    use_otlp_decoding: true

How did you test this PR?

  • Ran all existing OpenTelemetry tests (12 tests passed)
  • Verified that http_headers_logs_use_otlp_decoding_true test now properly validates metric emission through assert_source_compliance

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the `no-changelog` label to this PR.

References

@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Jan 9, 2026
@datadog-vectordotdev
Copy link

datadog-vectordotdev bot commented Jan 9, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: b508400 | Docs | Was this helpful? Give us feedback!

@thomasqueirozb thomasqueirozb marked this pull request as ready for review January 12, 2026 15:39
@thomasqueirozb thomasqueirozb requested a review from a team as a code owner January 12, 2026 15:39
@thomasqueirozb thomasqueirozb added the source: opentelemetry Anything `opentelemetry` source related label Jan 12, 2026
@thomasqueirozb thomasqueirozb changed the title fix(opentelemetry source): emit events_received metric when use_otlp_decoding is enabled fix(opentelemetry source): emit component_received_event* metrics when use_otlp_decoding is enabled Jan 12, 2026
@thomasqueirozb thomasqueirozb added this pull request to the merge queue Jan 12, 2026
Merged via the queue into master with commit a3a0e3a Jan 12, 2026
75 checks passed
@thomasqueirozb thomasqueirozb deleted the fix-otlp-decoding-metrics branch January 12, 2026 18:19
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

domain: sources Anything related to the Vector's sources source: opentelemetry Anything `opentelemetry` source related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing events count when switching to "use_otlp_decoding: true"

2 participants