#support

Issues with OpenTelemetry-Instrument and GRPC in Python

TLDR Andre faced an error with OpenTelemetry-Instrument affecting their Python code. Srikanth advised against downgrading but suggested not relying on opentelemetry-instrument.

Powered by Struct AI

1

9
7mo
Solved
Join the chat
Apr 28, 2023 (7 months ago)
Andre
Photo of md5-b47cd2d6f296171f60f471aa08ffef38
Andre
02:17 PM
Guys,

I use some google libs, such as Pub/Sub, when I start this way:

opentelemetry-instrument --traces_exporter otlp_proto_grpc --metrics_exporter otlp_proto_grpc python consumer.py

Gives this error:
Thread-ConsumeBidirectionalStream caught unexpected exception 'generator' object has no attribute 'add_done_callback' and will exit.
Traceback (most recent call last):

And with that my python instructions don’t work, has anyone faced this error?
02:20
Andre
02:20 PM
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
02:56 PM
This looks like bug because of the grpc instrumentation.
Andre
Photo of md5-b47cd2d6f296171f60f471aa08ffef38
Andre
03:09 PM
any tips?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
03:11 PM
You can probably disable the grpc instrumentation or wait for the bug to be fixed. Or there is a chance of instrumentation working with older grpc lib version.
Andre
Photo of md5-b47cd2d6f296171f60f471aa08ffef38
Andre
03:12 PM
I’m making use of google’s lib to consume google’s Pub/Sub queues. This is what consumer.py does
03:15
Andre
03:15 PM
I’m going to try to go back to python 3.6 and consume the older libs, what’s your opinion on this?
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
03:17 PM
I wouldn’t recommend that. The minimum supported version is 3.7. The auto instrumentation for the google pub sub is not really good. So I would suggest not to rely on opentelemetry-instrument for this.

1

Andre
Photo of md5-b47cd2d6f296171f60f471aa08ffef38
Andre
03:19 PM
thank you for the tips

SigNoz Community

Built with ClickHouse as datastore, SigNoz is an open-source APM to help you find issues in your deployed applications & solve them quickly | Knowledge Base powered by Struct.AI

Indexed 1023 threads (61% resolved)

Join Our Community