-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(core): unreadable interval_ms #23361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Datadog ReportBranch report: ✅ 0 Failed, 591 Passed, 0 Skipped, 4m 7.63s Total Time |
This reverts commit 4667fc9.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors how metric properties are populated in precompute_metric_value
and adds support for exposing interval_ms
in VRL, including updates to tests.
- Refactored property insertion to use a
MetricProperty
helper struct for cleaner logic. - Added
interval_ms
as a first‐class metric property in both code and tests.
Comments suppressed due to low confidence (2)
lib/vector-core/src/event/vrl_target.rs:557
- [nitpick] Consider renaming the
set
field to something more descriptive likeinserted
orpopulated
to clearly convey its purpose.
set: bool,
lib/vector-core/src/event/vrl_target.rs:587
- Add a test case for when
metric.interval_ms
isNone
and requested in VRL to verify that the field is correctly omitted or handled.
MetricProperty::new("interval_ms", |metric| metric.interval_ms().map(Into::into));
Co-authored-by: Pavlos Rontidis <pavlos.rontidis@gmail.com>
is this https://github.com/vectordotdev/vector/pull/23361/checks?check_run_id=45926250836 an old result? |
Summary
Make interval_ms readable from VRL
Vector configuration
How did you test this PR?
Ran the vector config, output should look something like this:
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changelog
label to this PR.References
Closes: #23358
Related: #23221
Caused by: #23217