open-telemetry / opentelemetry-python

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

OTel Python scenario runner (oteltest) #3813

Closed pmcollins closed 5 months ago

pmcollins commented 6 months ago

This is a scenario runner, the details of which are in the README, but basically, you run oteltest my_dir and it sets up a scenario defined by each script in the directory. You define the dependencies, the environment variables, and the executable part of the script, and oteltest will set up the environment, run it, and send the received telemetry back to the script. At that point, you can perform assertions, effectively making it an end to end test.

Addresses #3872

pmcollins commented 5 months ago

I find surprising having a python package inside tests/, do we have already another directory where it is more appropriate?

Agree. There's already some precedent as opentelemetry-test-utils lives right next door but I'm happy for this to live somewhere else if folks would prefer. And happy to change the name -- it could be called opentelemetry-test or opentelemetry-tester to match the other packages in this repo. oteltest could just be an alias. What do you think?

ocelotl commented 5 months ago

This belongs in the contrib repo, probably in the util directory.

pmcollins commented 5 months ago

This belongs in the contrib repo, probably in the util directory.

Perfect -- thank you Diego. Will open a PR there instead.