enhancement(transforms): dynamic rate for sample#24976
Open
jh7459-gh wants to merge 2 commits intovectordotdev:masterfrom
Open
enhancement(transforms): dynamic rate for sample#24976jh7459-gh wants to merge 2 commits intovectordotdev:masterfrom
jh7459-gh wants to merge 2 commits intovectordotdev:masterfrom
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
recheck |
ab4c006 to
af43106
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
1 similar comment
Author
|
recheck |
Author
|
CLA seems signed now (bot comment says all contributors have signed), but the CLAAssistant check is still red due a bot-side writeback error: 'Could not update the JSON file: Could not update file: Changes must be made through a pull request.' Could a maintainer please rerun/resolve the CLA check? |
Author
|
Closing and recreating this PR from a fresh branch/commit lineage due the stuck CLAAssistant state. A replacement PR will be opened immediately with the same code changes. |
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
This PR improves the
sampletransform for per-event sampling use cases by adding dynamic field-driven sampling while preserving safe fallback behavior.Changes included:
ratio_fieldsupport for per-event ratio sampling ((0, 1]).rate_fieldsupport for per-event1/Nsampling (positive integer).rateorratio), as a default value. i.e. dynamic-only mode is not allowed.ratio_fieldandrate_fieldtogether (mirrors the existingratevsratioexclusivity pattern).sample_rate_keypopulated with the effective sampling value used for each sampled event.Vector configuration
How did you test this PR?
Ran locally:
cargo fmt --allcargo test --no-default-features --features transforms-sample sample:: --libcargo clippy --no-default-features --features transforms-sample --lib --tests -- -D warnings./scripts/check_changelog_fragments.shTest coverage added/updated includes:
Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
sampletransform