Skip to content

Grpc channel API breaks when using grpc client instrumentor #1697

Open
@ianmcnally

Description

@ianmcnally

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

  1. Instrument with GrpcInstrumentorClient().instrument()
  2. In a grpc middleware, or anywhere with access to the grpc channel object, call a method on channel._channel, like channel._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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions