-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Public API to access the channel target of a gRPC request #38519
Copy link
Copy link
Open
Description
Python pubsub wants to obtain the channel target for a gRPC request. They're currently doing it the following way:
channel = client.transport.publish._channel
channel.target().decode("utf8")However, this broke when the underlying GAPIC implementation was updated to use an intercept channel. To summarize, the underlying type changed from _channel._UnaryUnaryMultiCallable to _interceptor._UnaryUnaryMultiCallable. The new type does not have the private property _channel directly exposed which breaks their code.
We've proposed the following workaround for now to unblock their release:
channel = client.transport.publish._thunk("")._channel
channel.target().decode("utf8")Given that the solution above still uses a private API and can easily break, we're looking for a public API to get the channel target.
Reactions are currently unavailable