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

OpenTelemetry tracing context in server/client context #36639

Open
chazov-ts opened this issue May 16, 2024 · 1 comment
Open

OpenTelemetry tracing context in server/client context #36639

chazov-ts opened this issue May 16, 2024 · 1 comment

Comments

@chazov-ts
Copy link

Is your feature request related to a problem? Please describe.

I'm implementing distributed tracing in a C++ application using gRPC and OpenTelemetry. My workflow involves creating spans within gRPC interceptors to trace request handling from start to finish. However, I'm encountering an issue where the tracing context created for a span in an interceptor is not readily accessible in subsequent handler functions. Currently, the only workaround is to manually pass this context via metadata and then reconstruct it in the handlers, which is inefficient and error-prone.
At the moment there is already a census_context field in contexts for similar ones for OpenCensus

Describe the solution you'd like

I propose a feature enhancement in the OpenTelemetry gRPC integration to allow direct storage and retrieval of the tracing context within the gRPC context. This would facilitate seamless access to the context in both server and client interceptors and throughout the request handling lifecycle without the need for manual metadata manipulation.

@yashykt
Copy link
Member

yashykt commented Jun 4, 2024

This is gonna start seeing some updates soon. Please stay posted.

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

No branches or pull requests

3 participants