-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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(sample transform): add sample_rate_key config option #21283
Conversation
I tried merging the latest changes to fix the conflicts, but I found there were a bunch of issues and I don't have the capacity to take that on at the moment, so I've reverted for now. Are there plans to merge this at some point soon-ish? If so, I might try to carve out some time to address this conflict/resulting issues. |
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.
Thanks for this @dekelpilli ! Apologies for the delayed review. It seems to have fallen through the cracks. One thing this is missing is a changelog entry. Do you mind adding one? See https://github.com/vectordotdev/vector/blob/master/changelog.d/README.md
The merge conflicts are pretty trivial, but there are actually a number of compilation errors here to resolve. Do you mind taking a look? Apologies again that this wasn't reviewed sooner. I'm happy to keep an eye on this and merge it when it is ready. |
Yeah, I realised later that the issue was that I wasn't able to compile the version I had forked locally (regardless of my changes), and now that I can, I can see the other compilation issues. I'll try to get this ready soon and hopefully it can be merged before 0.43. |
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.
Thanks @dekelpilli ! Could you do a couple of more things:
- Run
cargo fmt
- Run
make generate-component-docs
And push the changes? I started to, but I lack permissions to push to this branch.
I've run Also, I had ticked "Allow edits and access to secrets by maintainers" so I'm not sure why you didn't have access, but I've added you explicitly now anyway. |
Weird, it still won't let me edit this branch. I wonder if there is something special about the default branch ( 772554213b - (HEAD -> dekelpilli/master) regen docs (2 minutes ago) <Jesse Szwedko>
diff --git a/website/cue/reference/components/transforms/base/sample.cue b/website/cue/reference/components/transforms/base/sample.cue
index d6b573e409..fd698ecf7b 100644
--- a/website/cue/reference/components/transforms/base/sample.cue
+++ b/website/cue/reference/components/transforms/base/sample.cue
@@ -48,4 +48,12 @@ base: components: transforms: sample: configuration: {
1500,
]
}
+ sample_rate_key: {
+ description: "The event key in which the sample rate is stored. If set to an empty string, the sample rate will not be added to the event."
+ required: false
+ type: string: {
+ default: "sample_rate"
+ examples: ["sample_rate"]
+ }
+ }
} |
Thanks! I was able to make a bit more progress on pushing after accepting your invite to collaborate but I couldn't quite get the local branch tracking right. |
Head branch was pushed to by a user without write access
This PR adds an option,
sample_rate_key
, to thesample
transform, where leaving it empty should cause this value to be omitted. The new default is the same as the old hard-coded value (sample_rate
), so this should not be a breaking change.