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

Attaching a span to the trace started in the Tyk API Gateway from a grpc plugin when Open Telemetry is enabled. #6489

Open
ls-adrian-chong opened this issue Sep 9, 2024 · 2 comments

Comments

@ls-adrian-chong
Copy link

Is your feature request related to a problem? Please describe.
When Open Telemetry is enabled, I would like to be able to have a gRPC plugin add a span to the trace created by the Tyk API Gateway. Also, add trace context details from the gRPC plugin.

Currently, there is no trace context provided to the gRPC plugin so if a new span is created from within the gRPC plugin, it is not a child of the parent trace started in the Tyk API Gateway, instead a whole new trace is created.

Describe the solution you'd like
A way to be able to attach a span to the parent trace created by the Tyk API Gateway from the gRPC plugin.
Suppose this could be the trace id sent as a field in the context.

Thinking setting details on the trace context would also be possible if the trace context was provided.

Describe alternatives you've considered
Enabling detailed tracing in the api definition - nothing from the gRPC plugin.
Using ddtrace from within the gRPC plugin - results in a new trace that is unconnected to the one started from the Tyk API Gateway.

Reference:
https://community.tyk.io/t/opentelemetry-trace-with-grpc-plugin/7695/2

@buger
Copy link
Member

buger commented Sep 9, 2024

I think somthehing like this possible only with Go plugin, which has access to full native request context 🤔

@ls-adrian-chong
Copy link
Author

I think somthehing like this possible only with Go plugin, which has access to full native request context 🤔

Thinking if the trace id is sent to the gRPC plugin, then the plugin could create a span with context that is attached to the parent trace when it emits the span to Datadog.

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

2 participants