-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 policy sampling processor - 1/2 #1786
Add policy sampling processor - 1/2 #1786
Conversation
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
Codecov Report
@@ Coverage Diff @@
## master #1786 +/- ##
==========================================
+ Coverage 89.85% 89.87% +0.02%
==========================================
Files 376 378 +2
Lines 18180 18216 +36
==========================================
+ Hits 16336 16372 +36
Misses 1383 1383
Partials 461 461
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
) | ||
|
||
// PolicyType indicates the type of sampling policy. | ||
type PolicyType string |
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.
Do we want to restrict this to an enumerated list? If someone wants to create their own proprietary policy they will need to fork this repo and make changes.
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 the review! This part is inherited from the current tail-based sampling, but you are right. In fact, I think we could discuss making this go in another direction: instead of one "policysamplingprocessor", we could be having two or three processors: ratelimitingprocessor
(rate_limiting
from this PR) and attributesamplingprocessor
(string and int policies from this PR). The always
sampling would just disappear, as it's not really useful IMO.
What do you think?
As we discussed during the SIG, here's another attempt at making tail-sampling processor more robust: https://github.com/SumoLogic/opentelemetry-collector-contrib/tree/master/processor/cascadingfilterprocessor |
Closing this for now, as this will probably become two other processors. See #1797. |
Make the comment and log message match the actual constant used in the deprecation logic.
Signed-off-by: Juraci Paixão Kröhling juraci@kroehling.de
Description: This PR creates a new sampling processor based on the tail-based sampling, without the logic that is needed for the grouping of traces, which can be accomplished with the groupbytrace processor. Once this processor is merged, we can deprecate the tail-based sampler in favor of this + groupbytrace.
Testing: unit tests + manual tests (final solution).
Documentation: readme file.