Add SpanRateLimiter for Single Span Ingestion#3282
Conversation
| public override void OnDisallowed(Span span, int count, int intervalMs, int maxTracesPerInterval) | ||
| { | ||
| // TODO - copied from "TracerRateLimiter" - should this get logged? | ||
| Log.Warning<ulong, int, int>("Dropping span id {SpanId} with count of {Count} for last {Interval}ms.", span.SpanId, count, intervalMs); |
There was a problem hiding this comment.
I don't feel like this should be a warning (I'm not convinced the TraceRateLimiter one should be either), Debug seems like it would good enough to me 🤔
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
SpanRateLimiter for Single Span Ingestion
7ba0b8e to
e17b72b
Compare
Benchmarks Report 🐌Benchmarks for #3282 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 - Same speed ✔️ 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 #3282 into master will not change line coverage
View the full report for further details: Datadog.Trace Breakdown ✔️
The following classes have significant coverage changes.
The following classes were added in #3282:
16 classes were removed from Datadog.Trace in #3282 View the full reports for further details: |
Summary of changes
Adds a
SpanRateLimiterfor use with Single Span Ingestion.Reason for change
Each span sampling rule will have its own rate limit.
Implementation details
TracerRateLimiterTest coverage
😬 I didn't add anything to
RateLimiterTests, but I definitely can do some refactoring there to get this tested, but wasn't sure if it was needed as it doesn't really do anything different.Other details