-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(vrl): add functions for internal vector metrics access in VRL #23430
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
feat(vrl): add functions for internal vector metrics access in VRL #23430
Conversation
Adds 2 new functions: `get_vector_metric` and `find_vector_metrics`, enabling access to current Vector metrics (with some delay, to reduce locking). Closes: vectordotdev#23284
|
@pront this is still not done (I need to implement filtering by tags and maybe aggregation too), but I wanted to check if the way this global metrics cache is plugged into the topology looks alright to you. |
|
@pront |
Oh, sorry about that. I left it as a draft because it is not really complete. It is missing the additional function arguments, for filtering by tags and similar, but I was wondering if the way I hooked up the metrics storage with the topology was alright. I can add these missing arguments and finalize the functions if you would prefer that to be done first. |
No problem. Just to manage expectations, I don't think we have enough time to put in this release. But will prioritize it for the next one. |
Yeah, understood, that is fine. I am pretty sure I won't have it ready for the release anyways. |
thomasqueirozb
left a comment
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.
I merged master and resolved the conflicts but it seems like tests are failing (and have been even before my changes). I'll circle back to this PR once I see new commits pushed
|
I have fixed the one about using |
|
|
Looks like tests are failing in the CI also, not sure if something is different with your local environment that is making these tests pass. |
thomasqueirozb
left a comment
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.
Good to go! I'll enable auto merge and you can resolve all comments if you think no changes are necessary
|
It actually looks like playground is failing. I think that maybe we need to omit this new crate from vector_vrl_functions::all on wasm |
Yeah, I did that. It should be working now (it worked locally 😄 -- |
|
Hey @esensar, apologies for the delay - I was off for the last two weeks. Everything looks fine. Deny is failing due to an unrelated reason which I'll fix in another PR. This is good to go and I'll enable auto merge once deny is fixed, the only thing you'll need to do is to resolve all comments |
Summary
Adds 3 new functions:
get_vector_metric,find_vector_metricsandaggregate_vector_metrics, enabling access to current Vector metrics (with some delay, to reduce locking).Vector configuration
How did you test this PR?
Ran Vector with the above configuration.
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.cargo fmt --allcargo clippy --workspace --all-targets -- -D warningscargo nextest run --workspace(alternatively, you can runcargo test --all)git merge origin masterandgit push.Cargo.lock), pleaserun
cargo vdev build licensesto regenerate the license inventory and commit the changes (if any). More details here.