open-telemetry / opentelemetry-python

OpenTelemetry Python API and SDK
https://opentelemetry.io
Apache License 2.0
1.67k stars 570 forks source link

Add missing example requirements #4000

Open pirgeo opened 6 days ago

pirgeo commented 6 days ago

Description

Adds missing requirements.txt for one example (https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples/metrics/instruments).

Type of change

How Has This Been Tested?

pip install -r requirements.txt
python example.py                      # this is already part of the docs

Does This PR Require a Contrib Repo Change?

Checklist:

pirgeo commented 6 days ago

I tried to align with the other examples, which all have requirements.txt files. I don't have a preference for either, so I am happy to change it to simply adding it to the readme.

xrmx commented 6 days ago

I tried to align with the other examples, which all have requirements.txt files. I don't have a preference for either, so I am happy to change it to simply adding it to the readme.

Given the status of these requirements I think I have a stronger opinion now :sweat_smile: But let's see what maintainers think.

lzchen commented 6 days ago

I tried to align with the other examples, which all have requirements.txt files. I don't have a preference for either, so I am happy to change it to simply adding it to the readme.

Given the status of these requirements I think I have a stronger opinion now 😅 But let's see what maintainers think.

+1 for this, less maintenence the better :)

ocelotl commented 6 days ago

I suggest we keep the requirements.txt file, just remove the pinned versions.

pirgeo commented 5 days ago

I updated it to use >= instead of ==. Please let me know if you think this works, otherwise I'll just drop the versions completely!

lzchen commented 12 hours ago

@ocelotl

I suggest we keep the requirements.txt file, just remove the pinned versions.

We don't requirements.txt file for the examples. Do we really want to start adding them for each example? This seems like more maintenance overhead.