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
Performance investigation #1905
base: main
Are you sure you want to change the base?
Conversation
BenchmarksBenchmark execution time: 2023-11-23 16:08:26 Comparing candidate commit f6a1336 in PR branch Found 13 performance improvements and 4 performance regressions! Performance is the same for 22 metrics, 2 unstable metrics. scenario:BenchmarkExtractW3C-24
scenario:BenchmarkOTelApiWithCustomTags/datadog_otel_api-24
scenario:BenchmarkOTelApiWithCustomTags/otel_api-24
scenario:BenchmarkPartialFlushing/Disabled-24
scenario:BenchmarkPartialFlushing/Enabled-24
scenario:BenchmarkSingleSpanRetention/no-rules-24
scenario:BenchmarkSingleSpanRetention/with-rules/match-all-24
scenario:BenchmarkSingleSpanRetention/with-rules/match-half-24
scenario:BenchmarkTracerAddSpans-24
|
@@ -508,6 +508,35 @@ func (t *tracer) StartSpan(operationName string, options ...ddtrace.StartSpanOpt | |||
span.setMetric(keySamplingPriority, float64(p)) | |||
} | |||
if context.span != nil { | |||
// Performance note: |
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.
🚫 [golangci] reported by reviewdog 🐶
File is not gofmt
-ed with -s
(gofmt)
@@ -39,11 +40,15 @@ type Logger interface { | |||
} | |||
|
|||
var ( | |||
mu sync.RWMutex // guards below fields | |||
level = LevelWarn | |||
level atomic.Int32 = atomic.Int32{} |
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.
🚫 [golangci] reported by reviewdog 🐶
var-declaration: should omit type atomic.Int32 from declaration of var level; it will be inferred from the right-hand side (revive)
@@ -102,6 +102,13 @@ type spanContext struct { | |||
origin string // e.g. "synthetics" | |||
} | |||
|
|||
// TODO - this is just a temporary hack to avoid accessing mutex locked resource in a hotpath | |||
var TraceID128BitEnabled atomic.Bool = atomic.Bool{} |
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.
🚫 [golangci] reported by reviewdog 🐶
var-declaration: should omit type atomic.Bool from declaration of var TraceID128BitEnabled; it will be inferred from the right-hand side (revive)
What does this PR do?
Motivation
Describe how to test/QA your changes
Reviewer's Checklist