Add support for Protobuf 6
Is your feature request related to a problem?
Unable to use protobuf 6 in an application that uses opentelemetry.
Describe the solution you'd like
The version pinning here ought to be updated to v6, and proto files re-compiled with protoc 6.x.
Describe alternatives you've considered
No response
Additional Context
Protobuf 6 is the actively supported version of Protobuf, proto 5 is expected to EOL this year.
Based on pypi stats, proto6 has cross proto5:
Would you like to implement a fix?
No
I'll take a look on this one ✌
Discussed in the SIG (Jun 19th): Python SDK doesn’t have a strict Protobuf version policy—and since Protobuf 5.x remains supported until 2026, we have plenty of breathing room. For now, we’ve agreed to take a short-term approach: relax the opentelemetry-proto dependency as in #4620 and put #4643 on hold or perhaps work in a long-term solution based on having multiple versions of proto/exporters.
I'm using A2A (Agent to Agent) sdk in my python application AI Agent and A2A only supports protobuf v6+ Otel not supporting v6 is blocking use from using A2A client
For now, we’ve agreed to take a short-term approach: relax the opentelemetry-proto dependency
Thank you, that would be greatly appreciated.
or perhaps work in a long-term solution based on having multiple versions of proto/exporters
wandb do something like this, which seems to work quite well:
https://github.com/wandb/wandb/blob/7c8ead46482d3beafaeb8ba9f579e056b3812a68/wandb/proto/wandb_telemetry_pb2.py
Thankfully protobuf is now providing some guarantees on using old generated code with newer runtime versions:
So I think what @emdneto mentioned in https://github.com/open-telemetry/opentelemetry-python/issues/4639#issuecomment-2988646617 is the correct approach. Let's go ahead with https://github.com/open-telemetry/opentelemetry-python/pull/4620