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

grpc GrpcInstrumentorClient does not call request/response hooks for streaming rpcs #2948

Open
simon-weber opened this issue Nov 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@simon-weber
Copy link

Describe your environment

OS: Ubuntu
Python version: Python 3.8.18
Package version: 0.48b0
Package: opentelemetry-instrumentation-grpc

What happened?

The request/response hooks added in https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1706/files only seem to work for unary requests, not streaming requests.

Steps to Reproduce

Instrument using GrpcInstrumentorClient, pass request_hook and response_hook, then make a response-streaming rpc with a client.

Expected Result

Calls to the configured hooks. Maybe once per message and again when the request finishes?

Actual Result

No calls to the hooks.

Additional context

It looks like OpenTelemetryClientInterceptor._intercept calls _trace_result, but OpenTelemetryClientInterceptor._intercept_server_stream does not.

Would you like to implement a fix?

No

@simon-weber simon-weber added the bug Something isn't working label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant