-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add support for composite sampling policy to the tailsampler #4958
Conversation
@jpkrohling Requesting your review on this PR #4958. |
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.
@jpkrohling FYI... I have pulled in open comments from old PR
// it is not certain and it is also additional performance penalty when we are | ||
// already under a memory (and possibly CPU) pressure situation. | ||
// | ||
// For now we are playing safe and go with #3. Investigating alternate options |
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.
@jpkrohling Playing safe here probably means dropping everything, as sampling everything might put even more pressure on memory.
@vikrambe Agreed. We need to think through this. Any suggestion ?
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.
Wouldn't it work to just return NotSampled
?
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.
Sure, it should work. Let me run some tests and take this change in next PR.
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
@jpkrohling Appreciate your review on this |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
// restarts at the beginning of each second. | ||
// Current counters and rate limits are kept separately for each subpolicy. | ||
|
||
currSecond := c.timeProvider.getCurSecond() |
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 think I have asked this before, and sorry if you answered it as well, but did you try to use Go's rate limiting from the stdlib? https://pkg.go.dev/golang.org/x/time/rate
If you can't use that for some reason, perhaps it's worth a comment here?
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.
@jpkrohling Thanks, I like this idea. I had commented that i will take it in next PR. I need to run some tests to confirm the behaviour once.
// it is not certain and it is also additional performance penalty when we are | ||
// already under a memory (and possibly CPU) pressure situation. | ||
// | ||
// For now we are playing safe and go with #3. Investigating alternate options |
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.
Wouldn't it work to just return NotSampled
?
This LGTM, and the remaining comments can be handled later. Just make sure the lint checks are passing. |
@jpkrohling please approve workflow |
@jpkrohling I am not authorised to merge this PR. Please merge it |
@jpkrohling @dmitryax Can one of you please merge this PR ? |
@jpkrohling @dmitryax @bogdandrutu Can we merge this PR ? |
@jpkrohling Need your help in getting this merged |
@jpkrohling @dmitryax @bogdandrutu Can one of you merge this PR ? |
Sorry, I was out on PTO and couldn't follow up: @bogdandrutu, @tigrannajaryan, please merge this one once @vikrambe fixes the conflict in the readme file. |
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.
Needs a conflict resolution before I can merge.
@tigrannajaryan I have fixed the README conflict. Please merge it. |
@vikrambe I appreciate your patience and perseverance in getting this done. I just approved the tests to be executed. |
@vikrambe the build fails.
|
@jpkrohling @tigrannajaryan Thanks for reviewing this PR. Sorry for the delay i was caught up with other work. I have fixed the test. |
Thank you @vikrambe |
@vikrambe, again, thank you for not giving up! |
@jpkrohling @tigrannajaryan Thanks for all the help and support. |
Is your feature request related to a problem? Please describe.
#1410
Design Doc - Added support for composite policy in tailsampling processor. This would help in grouping sampling policies and rate limiting them. https://docs.google.com/document/d/10wpIv3TtXgOik05smHm3nYeBX48Bj76TCMxPy8e1NZw/edit#heading=h.ecy5l2puwtp4
This is a split. Refer PR open-telemetry/opentelemetry-collector#1894 (comment)
Due to EasyCLA issue opening a new PR: #4396
Link to tracking Issue: 1306