Skip to content

Conversation

@thomasqueirozb
Copy link
Contributor

@thomasqueirozb thomasqueirozb commented Jan 23, 2026

Summary

Important context: #24316 (comment)

Fixes event counting in the OpenTelemetry source when use_otlp_decoding: true. The component_received_events_total metric now correctly counts individual log records, metrics, and spans within OTLP batches instead of counting the number of batch requests.

This ensures consistency with:

  • Other Vector sources (Splunk HEC, Datadog, Kafka)
  • The same OpenTelemetry source when use_otlp_decoding: false

Since the previous fix was never released this one is being marked as no-changelog

Vector configuration

sources:
  source0:
    type: opentelemetry
    grpc:
      address: 0.0.0.0:4317
    http:
      address: 0.0.0.0:4318
    use_otlp_decoding: true

How did you test this PR?

Added comprehensive e2e tests that verify the metric counts individual items:

  • vector_component_received_events_total_counts_individual_log_records (logs)
  • vector_component_received_events_total_counts_individual_metrics (metrics)

Ran both e2e test suites:

./scripts/run-integration-test.sh e2e opentelemetry-logs
./scripts/run-integration-test.sh e2e opentelemetry-metrics

Both test suites passed, confirming the fix correctly counts 200 log records and 400 metrics instead of batch requests.

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 23, 2026
@thomasqueirozb thomasqueirozb added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Jan 23, 2026
@thomasqueirozb
Copy link
Contributor Author

Skipping the changelog as this is a fixup to the other one

@thomasqueirozb thomasqueirozb marked this pull request as ready for review January 23, 2026 17:45
@thomasqueirozb thomasqueirozb requested a review from a team as a code owner January 23, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: sources Anything related to the Vector's sources no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants