Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Span created on client stats handler is not accessible from client interceptor #1232

Open
jcchavezs opened this issue Oct 8, 2020 · 0 comments

Comments

@jcchavezs
Copy link

jcchavezs commented Oct 8, 2020

Is your feature request related to a problem? Please describe.
In the GRPC client, I am trying to access the span created by the stats handler from inside the interceptor but it is currently not possible as the context does not carry the span (see https://github.com/census-instrumentation/opencensus-go/pull/1233/files#diff-0dcdbbb99cd65803fcdadcb28ded881cR182), more so if the client span is a child of a parent span, we can access only the parent span but not the client span created by the stats handler (see https://github.com/census-instrumentation/opencensus-go/pull/1233/files#diff-0dcdbbb99cd65803fcdadcb28ded881cR120)

This happens because the interceptor calls the invoker and then it is the invoker the one that calls the StatsHandler which actually creates the span.

Describe the solution you'd like
I'd like this to be consistent with GRPC server where you can access the span in the context from the interceptor (see https://github.com/census-instrumentation/opencensus-go/pull/1233/files#diff-0dcdbbb99cd65803fcdadcb28ded881cR194)

Describe alternatives you've considered
None.

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

No branches or pull requests

1 participant