-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Implement max trace size parameter #7810
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Parship Chowdhury <[email protected]>
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (86.53%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #7810 +/- ##
==========================================
- Coverage 95.49% 95.47% -0.03%
==========================================
Files 312 312
Lines 16511 16561 +50
==========================================
+ Hits 15767 15811 +44
- Misses 580 585 +5
- Partials 164 165 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cmd/jaeger/internal/extension/jaegerquery/internal/querysvc/v2/querysvc/service_test.go
Outdated
Show resolved
Hide resolved
Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: Parship Chowdhury <[email protected]>
84d5c03 to
5694c37
Compare
|
closed and reopened to re-run some failing checks. |
2. remove same code at aggregator.go 3. remove skipCurrentTrace and do an early exit from mergeTraces if the current count is already at max 4. remove redundant checks at aggregator.go Signed-off-by: Parship Chowdhury <[email protected]>
2. use range with .All() in copySpansUpToLimit 3. argument order to (dest, src, ...) Signed-off-by: Parship Chowdhury <[email protected]>
Signed-off-by: Parship Chowdhury <[email protected]>
df74359 to
5b73044
Compare
cmd/jaeger/internal/extension/jaegerquery/internal/querysvc/v2/querysvc/service.go
Outdated
Show resolved
Hide resolved
Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: Parship Chowdhury <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: Parship Chowdhury <[email protected]>
…f copySpansUpToLimit, fix early return Signed-off-by: Parship Chowdhury <[email protected]>
Signed-off-by: Parship Chowdhury <[email protected]>
Metrics Comparison SummaryTotal changes across all snapshots: 0 Detailed changes per snapshotsummary_metrics_snapshot_cassandra📊 Metrics Diff SummaryTotal Changes: 0
summary_metrics_snapshot_cassandra📊 Metrics Diff SummaryTotal Changes: 0
summary_metrics_snapshot_cassandra📊 Metrics Diff SummaryTotal Changes: 0
|
|
bummer, merge conflicts, please resolve |
Signed-off-by: Parship Chowdhury <[email protected]>
|
@yurishkuro PTAL |
| incomingCount := src.SpanCount() | ||
| // check if we can merge all spans without exceeding limit | ||
| if maxSize <= 0 || *spanCount+incomingCount <= maxSize { | ||
| resources := src.ResourceSpans() |
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.
can you not just call MergeTraces?
| } | ||
| } | ||
|
|
||
| func mergeTraces(dest, src ptrace.Traces, maxSize int, spanCount *int) 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.
| func mergeTraces(dest, src ptrace.Traces, maxSize int, spanCount *int) bool { | |
| func mergeTracesWithLimit(dest, src ptrace.Traces, maxSize int, spanCount *int) bool { |
| // direct access to first span (if truncated, it must exist) | ||
| firstSpan := trace.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0) |
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.
you can do it safely (without this assumption) by using
for _, span := range jptrace.SpanIter(trace) {
AddWarnings(span, ...)
return
}
Which problem is this PR solving?
Description of the changes
max_trace_sizeconfiguration parameter to limit spans per traceHow was this change tested?
Checklist
jaeger:make lint testjaeger-ui:npm run lintandnpm run test