Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was 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

Description

@jcchavezs

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions