-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[exporterhelper] Add span links across batcher when merging multiple requests #12768
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
[exporterhelper] Add span links across batcher when merging multiple requests #12768
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (90.62%) 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 #12768 +/- ##
==========================================
- Coverage 91.43% 91.42% -0.01%
==========================================
Files 487 488 +1
Lines 26808 26839 +31
==========================================
+ Hits 24511 24537 +26
- Misses 1814 1818 +4
- Partials 483 484 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| require.NoError(t, qb.Shutdown(context.Background())) | ||
| } | ||
|
|
||
| // Validate that the batch is cancelled once the first request in the request is cancelled |
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.
I agree that this test should be removed. It does not make sense, IMO, to cancel a whole batch because one of the inputs timed out, for example.
| assert.Equal(t, 3, sink.ItemsCount()) | ||
| } | ||
|
|
||
| func TestQueueBatchWithTimeout(t *testing.T) { |
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.
I agree with removing this test. I assume other tests cover this behavior, it's not a very strong test condition.
|
@bogdandrutu @dmitryax I will merge this on Friday unless you block/comment by then |
jackgopack4
left a comment
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.
this is a tidy solution, just left one note about whether we should consider adding a trivial test case to get rid of the warning
|
|
||
| // LinksFromContext returns a list of trace links registered in the context. | ||
| func LinksFromContext(ctx context.Context) []trace.Link { | ||
| if ctx == nil { |
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.
I see the unit test nag and I am wondering if we have a mental model for when context might be nil. If it is unlikely to happen I'm ok with adding a simple test or test case to exercise that code and calling it good.
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.
I think passing in nil Contexts is considered very bad practice, and almost no code in collector/collector-contrib checks for that, so I think any receivers that do that would end up crashing the Collector very early anyway.
So I don't think that check is really needed (it's a holdover from the previous PR); if we really want the test coverage for its own sake, I'd say we remove the check entirely instead.
e367eb1
Description
Continuation of #12318:
Link to tracking issue
Updates #12212 (remaining: persist parent span across persistent queue)
(edit by @mx-psi):