You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I think now we need to explicitly specify version of protobuf pip package that is used from opentelemetry-exporter-otlp.
Reasonable resolution would be noting this topic somewhere in the documentation, IMHO.
Describe your environment
Ubuntu 20.04 or 22.04 (docker image)
Python 3.8.10 (Ubuntu 20.04) or Python 3.10.4 (Ubuntu 22.04)
opentelemetry 1.11.1 (also tried 1.9.1)
protobuf 4.21.2 (current latest release at pypi.org)
Steps to reproduce
You would see a stack trace like below so far as the installed protobuf version is 4.x.
At least, protobuf 3.20.1 (current latest 3.x series release) works.
# python3 test1.py
Traceback (most recent call last):
File "test1.py", line 40, in <module>
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
File "/usr/local/lib/python3.8/dist-packages/opentelemetry/exporter/otlp/proto/grpc/trace_exporter/__init__.py", line 22, in <module>
from opentelemetry.exporter.otlp.proto.grpc.exporter import (
File "/usr/local/lib/python3.8/dist-packages/opentelemetry/exporter/otlp/proto/grpc/exporter.py", line 39, in <module>
from opentelemetry.proto.common.v1.common_pb2 import (
File "/usr/local/lib/python3.8/dist-packages/opentelemetry/proto/common/v1/common_pb2.py", line 36, in <module>
_descriptor.FieldDescriptor(
File "/usr/local/lib/python3.8/dist-packages/google/protobuf/descriptor.py", line 560, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
What is the expected behavior?
No stack trace.
What is the actual behavior?
OTEL client program works w/o the stacktrace.
The text was updated successfully, but these errors were encountered:
Hi, I think now we need to explicitly specify version of protobuf pip package that is used from opentelemetry-exporter-otlp.
Reasonable resolution would be noting this topic somewhere in the documentation, IMHO.
Describe your environment
Steps to reproduce
You would see a stack trace like below so far as the installed protobuf version is 4.x.
At least, protobuf 3.20.1 (current latest 3.x series release) works.
What is the expected behavior?
No stack trace.
What is the actual behavior?
OTEL client program works w/o the stacktrace.
The text was updated successfully, but these errors were encountered: