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

Add initial revision of oteltest

Open pmcollins opened this issue 1 year ago • 1 comments
trafficstars

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

pmcollins avatar May 01 '24 16:05 pmcollins

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.

pmcollins avatar May 01 '24 16:05 pmcollins

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.

pmcollins avatar May 09 '24 13:05 pmcollins

Thanks @xrmx -- I've added unit tests and missing telemetry functions where there was a lack of symmetry between the signals.

pmcollins avatar May 20 '24 23:05 pmcollins

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!

pmcollins avatar May 22 '24 16:05 pmcollins

Closing as this lives at https://github.com/pmcollins/oteltest for now.

pmcollins avatar Jun 26 '24 14:06 pmcollins