-
Notifications
You must be signed in to change notification settings - Fork 2k
enhancement(vrl): consolidate all VRL functions into vector-vrl-functions crate #24402
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
01225b1
Create all_vrl_functions
thomasqueirozb f0196e3
Create and use vector-vrl-all
thomasqueirozb 3ffd126
Move dnstap-parser off of vector-lib
thomasqueirozb 583e0cd
Use vector-vrl-all in lib/codecs
thomasqueirozb c021e4f
refactor: use vector-vrl-all as workspace dependency
thomasqueirozb 37e0f62
docs: add crate-level documentation for vector-vrl-all
thomasqueirozb 04616c2
Use LazyLock to cache VRL function list
thomasqueirozb 183c3af
Revert "Use LazyLock to cache VRL function list"
thomasqueirozb eb21ee5
Add back changelog
thomasqueirozb c4e0104
cargo fmt
thomasqueirozb f819251
Skip testing vrl stdlib functions' examples
thomasqueirozb 19a6e9f
Fix broken examples
thomasqueirozb 5046d6b
Move VRL function consolidation logic into vector_vrl_functions::all()
thomasqueirozb a8236aa
Cargo fmt
thomasqueirozb 849e18c
Add ignore for disallowed_methods
thomasqueirozb 8a808bf
Merge remote-tracking branch 'origin/master' into vrl-all-functions
thomasqueirozb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Vector-specific VRL functions are now available everywhere. Previously some functions were not | ||
| available inside codec VRL transforms and in the VRL cli (via `vector vrl`). | ||
|
|
||
| authors: thomasqueirozb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| [package] | ||
| name = "vector-vrl-all" | ||
| version = "0.1.0" | ||
| authors = ["Vector Contributors <[email protected]>"] | ||
| edition = "2024" | ||
| publish = false | ||
| license = "MPL-2.0" | ||
|
|
||
| [dependencies] | ||
| vrl.workspace = true | ||
| vector-vrl-functions = { path = "../functions" } | ||
| enrichment = { path = "../../enrichment" } | ||
| dnstap-parser = { path = "../../dnstap-parser", optional = true } | ||
|
|
||
| [features] | ||
| default = [] | ||
| dnstap = ["dep:dnstap-parser"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| //! Central location for all VRL functions used in Vector. | ||
| //! | ||
| //! This crate provides a single source of truth for the complete set of VRL functions | ||
| //! available throughout Vector, combining: | ||
| //! - Standard VRL library functions (`vrl::stdlib::all`) | ||
| //! - Vector-specific functions (`vector_vrl_functions::all`) | ||
| //! - Enrichment table functions (`enrichment::vrl_functions`) | ||
| //! - DNS tap parsing functions (optional, with `dnstap` feature) | ||
|
|
||
| /// Returns all VRL functions available in Vector. | ||
| #[allow(clippy::disallowed_methods)] | ||
| pub fn all_vrl_functions() -> Vec<Box<dyn vrl::compiler::Function>> { | ||
| let functions = vrl::stdlib::all() | ||
| .into_iter() | ||
| .chain(vector_vrl_functions::all()) | ||
| .chain(enrichment::vrl_functions()); | ||
|
|
||
| #[cfg(feature = "dnstap")] | ||
| let functions = functions.chain(dnstap_parser::vrl_functions()); | ||
|
|
||
| functions.collect() | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.