Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove protobuf restriction on opentelemetry-exporter-prometheus-remote-write #3179

Open
michaelschuett-tomtom opened this issue Jan 9, 2025 · 4 comments

Comments

@michaelschuett-tomtom
Copy link

michaelschuett-tomtom commented Jan 9, 2025

What problem do you want to solve?

Currently if I want to use opentelemetry-exporter-prometheus-remote-write i am restricted to a 4 year old version of protobuf that is about to be EOL it also doesn't work with version of protoc which generates protobufs with imports that do not exist in the 4.21 version.

You will see something similar to this.

  File "<stdin>", line 1, in <module>
  File "/opt/anaconda3/lib/python3.11/site-packages/internal/client.py", line 8, in <module>
    from internal.feature import Feature, FeatureBuilder
  File "/opt/anaconda3/lib/python3.11/site-packages/internal/feature.py", line 3, in <module>
    from idl.model.feature_pb2 import FeatureProto, FeatureStatus
  File "/opt/anaconda3/lib/python3.11/site-packages/idl/model/feature_pb2.py", line 9, in <module>
    from google.protobuf import runtime_version as _runtime_version

https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/exporter/opentelemetry-exporter-prometheus-remote-write

Describe the solution you'd like

Allow for newer versions of protobuf or possibly some other solution exists that I am not aware of but currently pulling in any python dep that holds back the protobuf version to some very old one is a pain because you need to go and setup older tooling that might not be readily available on your distro.

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

I can after we have a clear path but I think I am likely missing some context for why we are pinning to such an old version. Possibly this is a much bigger issue with the entire project needing to upgrade the protobuf version.

@michaelschuett-tomtom
Copy link
Author

Through testing I have also found that using the newer version of 5.29.2 with this package works just so it seems it is backwards compatible with the code that is already generated with an older version of protobuf.

@aabmass
Copy link
Member

aabmass commented Jan 10, 2025

Currently if I want to use opentelemetry-exporter-prometheus-remote-write i am restricted to a 4 year old version of protobuf that is about to be EOL

Allow for newer versions of protobuf or possibly some other solution exists that I am not aware of but currently pulling in any python dep that holds back the protobuf version to some very old one is a pain because you need to go and setup older tooling that might not be readily available on your distro.

I think I'm missing something here, we are using the ~= specifier so it should not be held back to a 4 year old version:

Are you saying the generated pb code doesn't work with newer protobuf 4.x releases?

@aabmass
Copy link
Member

aabmass commented Jan 10, 2025

We test against protobuf 4.25.3 which is less than a year old

Regardless, I'm ok if you want to upgrade it to protobuf 5.x since we already did that for OTLP

@michaelschuett-tomtom
Copy link
Author

Ah sorry you are correct I was just looking at the support for the 4.21 version so the EOL statement is not correct. So this is mainly just an issue if you are on 5.x release now and using this in your project.

I'll put up a PR and we can continue the discussion. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants