Rename RuleBasedSampler to TraceSampler#3156
Conversation
andrewlock
left a comment
There was a problem hiding this comment.
I'm not sure about this:
- In Zach's stats PR he introduces
ITraceSampler- this could get confusing I think - Arguably, this makes sampling decisions for Spans rather than traces?
- The
CiSampleris also a trace sampler
If we're going to rename it, I would probably just call it DefaultSampler?
True. Though, what we call sampler everywhere is more the ones we have here. I believe we shall rename the ones in Zach's PR actually as most of them just decide to drop/keep based on a previous sampling decision.
We check spans but the result is to keep the whole trace.
Indeed. Note for self, I should have discussed this plan in a team meeting to raise remarks/questions early on. |
This comment has been minimized.
This comment has been minimized.
Good catch on that I'll leave this here for now, but |
This comment has been minimized.
This comment has been minimized.
89b03cf to
f27b5cb
Compare
This comment has been minimized.
This comment has been minimized.
f27b5cb to
cd7b0db
Compare
Benchmarks Report 🐌Benchmarks for #3156 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Unknown 🤷 Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.SpanBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️Raw results
|
Code Coverage Report 📊⛔ Merging #3156 into master will will decrease line coverage by
View the full report for further details: Datadog.Trace Breakdown ⛔
The following classes have significant coverage changes.
The following classes were added in #3156:
1 classes were removed from Datadog.Trace in #3156 View the full reports for further details: |
RuleBasedSampler to TraceSampler
Summary of changes
This renames the following:
Datadog.Agent.TraceSamplersITraceSampler->ITraceChunkSampler(over alternativeITraceAgentSampler)RareSampler,ErrorSampler, etc all stay the sameDatadog.Trace.SamplingISampler->ITraceSamplerRuleBasedSampler->TraceSamplerCustomSamplingRule,DefaultSamplingRule,GlobalSamplingRulestay the sameReason for change
Motivation is that this is not just a rule-based sampler and ultimately just operates on traces.
For single span ingestion we'll have a
SpanSamplerso this would help clarify the differences between the two.Test coverage
The now renamed
TraceSamplerTestsall still pass.