open-telemetry / open-telemetry/opentelemetry-python-contrib
Grpc channel API breaks when using grpc client instrumentor
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 1.1k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 16
Description
Describe your environment
I'm using GrpcInstrumentorClient (https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/grpc/grpc.html#usage-client) version 0.30b1 in a python (3.7) flask application. When closing the channel, using a custom wrapper around channel, calls to the grpc.Channel._channel API fail.
Steps to reproduce
- Instrument with GrpcInstrumentorClient().instrument()
- In a grpc middleware, or anywhere with access to the grpc channel object, call a method on
channel._channel, likechannel._channel.check_connectivity_state()
What is the expected behavior?
the grpc channel._channel is an instance of grpc._cython.cygrpc.Channel
What is the actual behavior?
the grpc channel._channel is an instance of grpc._channel.Channel
Additional context
GRPCInstrumentorClient works fine with no middleware or other interceptors present.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GrpcInstrumentorClient instrumentation and its channel wrapper, reproducing the failure with Python 3.7, Flask, grpc version 0.30b1, and a call to channel._channel.check_connectivity_state(). Done means instrumented channels retain the expected grpc._cython.cygrpc.Channel API while middleware or other interceptors are present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100