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

Tracing doesn't work #30

Closed
bboreham opened this issue Oct 21, 2022 · 0 comments · Fixed by #33
Closed

Tracing doesn't work #30

bboreham opened this issue Oct 21, 2022 · 0 comments · Fixed by #33

Comments

@bboreham
Copy link

It relies on tracerKey which is only used in one place to read from a Context. Since it is never set, the NoopTracer is used.

func tracerFromContext(ctx context.Context) opentracing.Tracer {
val := ctx.Value(tracerKey)
if sp, ok := val.(opentracing.Tracer); ok {
return sp
}
return nil

In the similar package in thanos-io/thanos there is a function to set the key:

https://github.com/thanos-io/thanos/blob/25d91c103a416df733320563bb108d734f91b8af/pkg/tracing/tracing.go#L37-L39

Note that the tracerKey there is a different value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant