Always Off Sampler#125
Conversation
|
I signed it |
Codecov Report
@@ Coverage Diff @@
## master #125 +/- ##
==========================================
+ Coverage 93.29% 93.37% +0.07%
==========================================
Files 66 69 +3
Lines 1656 1676 +20
==========================================
+ Hits 1545 1565 +20
Misses 111 111
|
| */ | ||
| SamplingResult ShouldSample( | ||
| const SpanContext *parent_context, | ||
| trace_api::TraceId trace_id, |
There was a problem hiding this comment.
There is potential optimization to this, by avoiding the trace_id creation (random number generation) at all. Probably worth creating an issue for tracking.
There was a problem hiding this comment.
Alright, I'll bring this up to Johannes later today.
There was a problem hiding this comment.
I don't see how we could easily avoid that. The trace_id is created only once for every trace anyway. And even if an always-off sampler is active, we might still need the trace id for an outgoing context.
Also, the spec requires the trace id to be passed to a sampler.
| */ | ||
| SamplingResult ShouldSample( | ||
| const SpanContext *parent_context, | ||
| trace_api::TraceId trace_id, |
There was a problem hiding this comment.
I don't see how we could easily avoid that. The trace_id is created only once for every trace anyway. And even if an always-off sampler is active, we might still need the trace id for an outgoing context.
Also, the spec requires the trace id to be passed to a sampler.
62e5c21 to
61c95a9
Compare
|
I've made all the requested changes and moved the sampler to |
merged from upstream

Implements AlwayOffSampler based on the sampler interface in #118.