Skip to content
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

JetStream consumer does not properly propagate tracing context #541

Open
dan-j opened this issue Apr 13, 2024 · 3 comments
Open

JetStream consumer does not properly propagate tracing context #541

dan-j opened this issue Apr 13, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@dan-j
Copy link
Contributor

dan-j commented Apr 13, 2024

Describe the bug

This bit of code attaches the trace to c.ctx and not ctx, then ctx is used in SendMessage()

sc, ok := tracing.ParseSpanContext(event)
var span *trace.Span
if !ok {
c.logger.Warn("Cannot parse the spancontext, creating a new span")
c.ctx, span = trace.StartSpan(c.ctx, jsmChannel+"-"+string(c.sub.UID))
} else {
c.ctx, span = trace.StartSpanWithRemoteParent(c.ctx, jsmChannel+"-"+string(c.sub.UID), sc)
}
defer span.End()
te := TypeExtractorTransformer("")
dispatchExecutionInfo, err := c.dispatcher.SendMessage(
ctx,
message,
c.sub.Subscriber,
kncloudevents.WithReply(c.sub.Reply),
kncloudevents.WithDeadLetterSink(c.sub.DeadLetter),
kncloudevents.WithRetryConfig(c.sub.RetryConfig),
kncloudevents.WithTransformers(&te),
kncloudevents.WithHeader(additionalHeaders),
)

@dan-j dan-j added the kind/bug Categorizes issue or PR as related to a bug. label Apr 13, 2024
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 13, 2024
@astelmashenko
Copy link
Member

/remove-lifecycle stale

@knative-prow knative-prow bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 13, 2024
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

2 participants