chore(codecs): add native OTLP metric encoder e2e suite#25794
Conversation
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.
… metrics to verify that specific encoding logic
There was a problem hiding this comment.
💡 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".
… peter.ehik/OPA-5717/implement-otlp-metric-encoder-testing
There was a problem hiding this comment.
💡 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".
bruceg
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
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:
Vector configuration
How did you test this PR?
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
Notes
@vectordotdev/vectorto reach out to us regarding this PR.pre-pushhook, please see this template.make fmtmake check-clippy(if there are failures it's possible some of them can be fixed withmake clippy-fix)make testgit merge origin masterandgit push.Cargo.lock), pleaserun
make build-licensesto regenerate the license inventory and commit the changes (if any). More details on the dd-rust-license-tool.