[exporterhelper] Propagate Context in DisabledBatcher#12225
Closed
jade-guiton-dd wants to merge 1 commit intoopen-telemetry:mainfrom
Closed
[exporterhelper] Propagate Context in DisabledBatcher#12225jade-guiton-dd wants to merge 1 commit intoopen-telemetry:mainfrom
jade-guiton-dd wants to merge 1 commit intoopen-telemetry:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12225 +/- ##
=======================================
Coverage 91.25% 91.25%
=======================================
Files 466 466
Lines 25722 25722
=======================================
Hits 23472 23472
Misses 1837 1837
Partials 413 413 ☔ View full report in Codecov by Sentry. |
bogdandrutu
approved these changes
Jan 31, 2025
ms-jcorley
approved these changes
Jan 31, 2025
| defer qb.stopWG.Done() | ||
| for { | ||
| idx, _, req, ok := qb.queue.Read(context.Background()) | ||
| idx, ctx, req, ok := qb.queue.Read(context.Background()) |
Contributor
There was a problem hiding this comment.
Perhaps a naive question: should the Context from the Start parameters above be used?
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Feb 1, 2025
Finishes the implementation started in #12225 Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When the batching functionality of
exporterhelperis disabled (which is the default), theDisabledBatcherdiscards the provided Context and creates a new one with context.Background. This breaks traces, even when using the in-memory queue.Link to tracking issue
No tracking issue.
Testing
I compared the traces emitted for a simple OTLP receiver -> OTLP exporter pipeline: the
exporterhelperspan is in its own trace before the PR, and in the same trace as the receiver span after.