Skip to content

chore(codecs): add native OTLP metric encoder e2e suite#25794

Open
petere-datadog wants to merge 7 commits into
peter.ehik/OPA-5715/implement-otlp-metric-encoderfrom
peter.ehik/OPA-5717/implement-otlp-metric-encoder-testing
Open

chore(codecs): add native OTLP metric encoder e2e suite#25794
petere-datadog wants to merge 7 commits into
peter.ehik/OPA-5715/implement-otlp-metric-encoderfrom
peter.ehik/OPA-5717/implement-otlp-metric-encoder-testing

Conversation

@petere-datadog

@petere-datadog petere-datadog commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Add integration test to verify the OTLP metric encoder. Basically runs a test with use_otlp_decoding: false so the events get converted to vector native structs and then we try to flush to an otel receiver using the Otel sink which means the OTLP metric encoder path is exercised.

Testing

Ran test locally with this command:

env -u DOCKER_HOST DOCKER_CONTEXT=colima cargo vdev e2e test opentelemetry-metrics-native

Vector configuration

How did you test this PR?

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • 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

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details on the dd-rust-license-tool.

Add opentelemetry-metrics-native e2e suite exercising the native
Event::Metric OTLP encoder. Unlike the existing opentelemetry-metrics
suite (use_otlp_decoding: true, descriptor passthrough), this runs Vector
with use_otlp_decoding: false so metrics flow through
metric_event_to_export_request.

telemetrygen emits Gauge and Sum (counter) metrics through the source
collector into Vector's OTLP sink and out to a sink collector, which the
test reads back and validates: names preserved, Gauge/Sum types, values,
non-zero timestamps, and round-tripped service.name and metric.type
attributes.
Register the native OTLP metric encoder e2e suite in CI: add it to the
e2e service matrix in integration.yml and ci-integration-review.yml, and
surface its path-filter output in changes.yml so PRs touching the encoder
trigger it.
@github-actions github-actions Bot added the domain: ci Anything related to Vector's CI environment label Jul 9, 2026
@petere-datadog petere-datadog changed the title test(codecs): add native OTLP metric encoder e2e suite chore(codecs): add native OTLP metric encoder e2e suite Jul 10, 2026
@petere-datadog petere-datadog marked this pull request as ready for review July 10, 2026 15:36
@petere-datadog petere-datadog requested a review from a team as a code owner July 10, 2026 15:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60e79ced75

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread tests/e2e/opentelemetry-metrics-native/config/test.yaml

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 432e59a02d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread tests/e2e/opentelemetry-metrics-native/config/test.yaml

@bruceg bruceg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, though I wonder about this being adequate testing. See comment below.

until nc -z otel-collector-source 4318; do
sleep 0.5
done
# Generate 50 Gauge metrics

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the more complex parts of the newly-written encoder are the non-scalar metrics (histograms, etc). Is there a good way of exercising those with this test framework?

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

Labels

domain: ci Anything related to Vector's CI environment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants