Probability Sampler#136
Conversation
0359e4c to
1097723
Compare
Codecov Report
@@ Coverage Diff @@
## master #136 +/- ##
==========================================
+ Coverage 94.18% 94.59% +0.40%
==========================================
Files 80 83 +3
Lines 1893 2034 +141
==========================================
+ Hits 1783 1924 +141
Misses 110 110
|
pyohannes
left a comment
There was a problem hiding this comment.
I think it would make sense to simplify this for the first go, and then discuss what of the SHOULD parts of the spec we want to add:
- We can get rid of
SamplingBehaviorand just implement the defaultDETACHED_SPANS_ONLYlogic. - We can get rid of
defer_parentand just implement the defaultdefer_parent = true.
If deemed necessary, we can add those parts in separate PRs (no of the other SDKs I looked at have this implemented now). This way we can reduce complexity.
84f5801 to
a03c841
Compare
a03c841 to
b10f67d
Compare
|
The current implementation of this Sampler handles invalid parameter values (i.e. any probability out of the bounds [0, 1]) silently. The intended functionality is to raise an exception to alert the user, however, this is currently not allowed by CI tests (see #156). This PR can be merged now and the error handing can be added in a later PR, or this will have to wait for #156 to be resolved. |
e6629b6 to
d930347
Compare
pyohannes
left a comment
There was a problem hiding this comment.
This looks good, I added some thoughts.
c4dd785 to
a1470b0
Compare
|
@nholbrook would you please rebase? Thanks. |
a1470b0 to
a788576
Compare
|
@reyang Rebased |
|
Friends, please shed some light on necessity of CalculateThreshold It moves us from double to int64 space, which is sometimes good. But is it really necessary in this case? What is wrong with converting // if (CalculateThresholdFromBuffer(trace_id) <= threshold_)
if (CalculateRatioFromBuffer(trace_id) <= ratio_) |
…s-create-or-update-comment-digest Update peter-evans/create-or-update-comment digest to 4ed2ee4
Implements ProbabilitySampler based on the sampler interface in #118.