-
Notifications
You must be signed in to change notification settings - Fork 497
chore(config): migrate partialFlushMinSpans #4260
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
chore(config): migrate partialFlushMinSpans #4260
Conversation
BenchmarksBenchmark execution time: 2025-12-19 17:24:25 Comparing candidate commit a325530 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 6 metrics, 0 unstable metrics. |
internal/config/config_helpers.go
Outdated
| if minSpans < 0 { | ||
| log.Warn("ignoring DD_TRACE_PARTIAL_FLUSH_MIN_SPANS: negative value %d", minSpans) | ||
| return false | ||
| } | ||
| if minSpans > TraceMaxSize { |
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.
In the deleted code (ddtrace/tracer/option.go L427-430), minSpans values == 0 or TraceMaxSize were considered invalid. Should we keep that here?
b678160 to
502c122
Compare
ecac1f6 to
2aad4eb
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files
🚀 New features to boost your workflow:
|
44a63e2 to
5a1651e
Compare
502c122 to
221487e
Compare
| func (c *Config) SetPartialFlushMinSpans(minSpans int, origin telemetry.Origin) { | ||
| c.mu.Lock() | ||
| defer c.mu.Unlock() | ||
| c.partialFlushMinSpans = minSpans |
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.
Should we validate the values passed via programatic API ?
221487e to
3752241
Compare
5a1651e to
3f318b1
Compare
3752241 to
da8511d
Compare
3f318b1 to
9a9bb27
Compare
9a9bb27 to
a325530
Compare
da8511d to
4c491d3
Compare

What does this PR do?
Migrates tracer to use Config.partialFlushMinSpans
Motivation
https://datadoghq.atlassian.net/browse/APMAPI-1745
Reviewer's Checklist
./scripts/lint.shlocally.Unsure? Have a question? Request a review!