Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(exporter-otlp-*-http): clean up tests #5197

Closed
wants to merge 1 commit into from

Conversation

pichlermarc
Copy link
Member

Which problem is this PR solving?

All the functionality that's duplicate-tested in all the HTTP/json exporters is now tested in the exporter base packages as well as in @opentelemetry/otlp-transformer for serialization. This PR is similar to #5196, but for the HTTP exporters.

This PR removes the tests from the individual exporters and replaces them with a simple check that tests if

  • http/xhr/sendBeacon is indeed used
  • the export succeeds

The previous implementation was heavily relying on constructing export data and asserting the data that is sent, which makes changes to the SDK's internal structure very difficult. This testing is now all handled in @opentelemetry/otlp-transformer so there should be no need to test this again in every individual exporter.

I also added a comment for future contributors that this tests file is not where they should add any tests that concern base components.

Partially enables #4583 (types exported from @opentelemetry/otlp-transformer are used in testing, by removing test usages, we can remove types that were only used in tests from the public API)

Type of change

  • Internal test update

How Has This Been Tested?

  • Changed tests

@pichlermarc
Copy link
Member Author

opened this from the wrong repo, closing.

@pichlermarc pichlermarc deleted the chore/cleanup-http-json-exporter-tests branch December 18, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant