enhancement(transforms): add rate_field and dynamic-field fallback support to sample#24977
enhancement(transforms): add rate_field and dynamic-field fallback support to sample#24977jh7459-gh wants to merge 3 commits intovectordotdev:masterfrom
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
1 similar comment
|
recheck |
|
CLA is signed (the bot comment says ‘All contributors have signed the CLA’), but the check still fails due a bot-side writeback error:\n\n\n\nCould a maintainer please rerun/resolve or override this required CLA check? This appears unrelated to PR code/content. |
|
Follow-up with exact error text: CLA is signed (bot comment confirms all contributors have signed), but the CLAAssistant workflow run still fails with: Could a maintainer please rerun/resolve or override the required CLA check for this PR? This appears to be a CLA bot permissions/config issue, not a code issue in this PR. |
|
@vectordotdev/vector could someone please take a quick look at the CLA check on this PR? The CLA is already signed (bot comment confirms "All contributors have signed the CLA"), but the required
Latest failing run: This appears to be a CLA bot/repo-permissions issue rather than a PR/code issue. |
|
Closing in favor of #24976 (reopened), where CLA and required lightweight checks are currently passing on the existing head SHA. |
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