opentelemetry-docker-tests: Refactor Docker tests to properly validate contents of exported telemetry#5220
Open
herin049 wants to merge 14 commits into
Open
opentelemetry-docker-tests: Refactor Docker tests to properly validate contents of exported telemetry#5220herin049 wants to merge 14 commits into
herin049 wants to merge 14 commits into
Conversation
xrmx
reviewed
May 18, 2026
Contributor
xrmx
left a comment
There was a problem hiding this comment.
As a reminder for some reason the stuff we add to test-utils may also be used by downstream users
Contributor
Author
@xrmx I figured we can maybe keep the server class public since some users might find it useful. Alternatively, I can make it private for now. Let me know what you think. |
Removed PyYAML and requests dependencies from docker-tests environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Prior to this refactor, the existing Docker exporter tests only verify that telemetry is correctly received by the OpenTelemetry collector. However, it does not validate that the contents of the telemetry received by the collector is semantically correct.
This refactor updates the Docker tests to properly validate the correctness of the contents of the telemetry received by the collector by updating the collector to forward all received telemetry to an additional OTLP HTTP server listening in the test runner process. The
pytesttests are then able to examine the forwarded telemetry and verify the correctness of the contents of the telemetry, and that nothing was lost or mangled during exporting.This PR also switches to using the system
dockerexecutable and likewise switches from usingdocker-composetodocker compose. Furthermore, it also adds functional tests for logging, which were previously not present.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Contrib Repo Change?
Checklist: