Skip to content

Fix tracing for StreamWriteRequest - #7757

Open
SungJin1212 wants to merge 3 commits into
masterfrom
fix-stream-push-trace
Open

Fix tracing for StreamWriteRequest#7757
SungJin1212 wants to merge 3 commits into
masterfrom
fix-stream-push-trace

Conversation

@SungJin1212

@SungJin1212 SungJin1212 commented Aug 11, 2026

Copy link
Copy Markdown
Member

What this PR does:
Fixes tracing of write requests when -distributor.use-stream-push is enabled.

The PushStream connection is opened once at startup and reused by every write request, so its gRPC metadata cannot carry their trace context. As a result every push was traced as a child of the span of the connection, which only ends when the connection closes.

This PR propagates the trace context within each message instead, the same way the frontend does over the scheduler stream (httpgrpcutil.HttpgrpcHeadersCarrier).

스크린샷 2026-08-11 오후 8 33 57

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
@dosubot dosubot Bot added go Pull requests that update Go code type/bug type/observability To help know what is going on inside Cortex labels Aug 11, 2026
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>

@sandy2008 sandy2008 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code size/L type/bug type/observability To help know what is going on inside Cortex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants