opentelemetry-python-contrib
opentelemetry-python-contrib copied to clipboard
Add initial revision of oteltest
This is an OpenTelemetry scenario runner for running integration tests and examples. It sets up and runs a scenario defined by each script in a given directory. Script authors define the dependencies, the environment variables, the executable part of the script + any client code, and oteltest sets up the environment, runs the script + client code, and sends the received telemetry back to the script, at which point it can perform assertions.
This was demoed at the Python SIG, and there was an initial PR in the core repo, but we've decided that the best home for it is here, in Contrib.
Addresses https://github.com/open-telemetry/opentelemetry-python/issues/3872
Also, I published this package to pypi for my own testing purposes: https://pypi.org/project/oteltest/ . Not sure yet what the process is but am happy to transfer its ownership to this SIG.
I think that oteltest may use a bit more of unit testing, the Telemetry class methods and some helpers in oteltest.private at least. I'm not asking to add them, just a thought.
Totally agree. There's some testing that I want to add in later PRs but will add this now as well.
Thanks @xrmx -- I've added unit tests and missing telemetry functions where there was a lack of symmetry between the signals.
Hi all, any objections to me converting this to draft, opening a PR downstream, and closing this PR once that one has landed? (I'm happy to abort that process at any time to put this functionality here if folks would prefer)
Special thanks to @xrmx and @tammy-baylis-swi for the feedback!
Closing as this lives at https://github.com/pmcollins/oteltest for now.