opentelemetry-python icon indicating copy to clipboard operation
opentelemetry-python copied to clipboard

Add support for Protobuf 6

Open maroux opened this issue 6 months ago • 4 comments

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:

Image

Would you like to implement a fix?

No

maroux avatar Jun 16 '25 17:06 maroux

I'll take a look on this one ✌

emdneto avatar Jun 17 '25 01:06 emdneto

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.

emdneto avatar Jun 19 '25 16:06 emdneto

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

csantanapr avatar Jun 21 '25 15:06 csantanapr

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

lukasbindreiter avatar Jun 23 '25 08:06 lukasbindreiter

Thankfully protobuf is now providing some guarantees on using old generated code with newer runtime versions:

Starting with the 2025Q1 release, the protobuf project will adopt a rolling compatibility window for major versions. Code generated for a major version V (full version: V.x.y) will be supported by protobuf runtimes of version V and V+1.

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

aabmass avatar Jun 23 '25 15:06 aabmass