feat: add opentelemetry-exporter-http-transport package#5194
Conversation
|
Thanks for the PR! Just a heads-up: we no longer update Please add the appropriate changelog fragment for this change instead of editing |
codeboten
left a comment
There was a problem hiding this comment.
Is there already a branch somewhere showing how this package can be used inside some of the other http exporters?
@codeboten I've opened #5219 which includes the full changes updating the OTLP Proto HTTP exporter to use this new package. I've also switched to start using |
MikeGoldsmith
left a comment
There was a problem hiding this comment.
I'm in favour of this change, it makes a lot of sense to have a shared package.
I've left some comments here, and will add to the on-going conversation around naming.
There was a problem hiding this comment.
Pull request overview
Adds a new opentelemetry-exporter-http-transport package intended to provide shared HTTP transport abstractions for exporter implementations, including optional requests and urllib3 backends.
Changes:
- Introduces base HTTP result/transport interfaces and concrete
requests/urllib3transport implementations. - Adds package metadata, README, changelog, lockfile/workspace wiring, tox environments, and CI jobs.
- Adds unit tests and test requirements for both HTTP backend implementations.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
.changelog/5194.added |
Adds changelog fragment for the new package. |
.github/workflows/lint.yml |
Adds lint CI job for the new package. |
.github/workflows/test.yml |
Adds test CI jobs for the new package across Python/platform/version matrices. |
dev-requirements.txt |
Adds mocket for test/lint dependency resolution. |
eachdist.ini |
Registers the new package in prerelease distribution tooling. |
exporter/opentelemetry-exporter-http-transport/LICENSE |
Adds package license file. |
exporter/opentelemetry-exporter-http-transport/README.rst |
Documents installation and purpose of the new package. |
exporter/opentelemetry-exporter-http-transport/pyproject.toml |
Defines package metadata, extras, and build configuration. |
exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/__init__.py |
Adds package namespace module. |
exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_base.py |
Adds abstract HTTP transport/result interfaces. |
exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_requests.py |
Adds requests-based HTTP transport/result implementation. |
exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/_urllib3.py |
Adds urllib3-based HTTP transport/result implementation. |
exporter/opentelemetry-exporter-http-transport/src/opentelemetry/exporter/http/transport/version/__init__.py |
Adds package version module. |
exporter/opentelemetry-exporter-http-transport/test-requirements.in |
Defines test dependency inputs. |
exporter/opentelemetry-exporter-http-transport/test-requirements.latest.txt |
Adds compiled latest test dependencies. |
exporter/opentelemetry-exporter-http-transport/test-requirements.oldest.txt |
Adds compiled oldest test dependencies. |
exporter/opentelemetry-exporter-http-transport/tests/__init__.py |
Adds test package marker. |
exporter/opentelemetry-exporter-http-transport/tests/test_requests_transport.py |
Adds tests for the requests transport. |
exporter/opentelemetry-exporter-http-transport/tests/test_urllib3_transport.py |
Adds tests for the urllib3 transport. |
pyproject.toml |
Adds workspace and pyright wiring for the new package. |
tox.ini |
Adds tox test/lint environments and pyright dependency wiring. |
uv.lock |
Adds lockfile entries for the new workspace package and extras. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@lzchen All conversations should be resolved. |
Description
Adds a common
opentelemetry-exporter-http-transportpackage that will be utilized by multiple HTTP exporter packages (initially OTLP JSON) to abstract away and generalize underlying HTTP transport implementations and exporting with OTLP. Introducing this package will significantly reduce the amount of code duplication present in HTTP exporters and will allow for the usage of alternative HTTP client libraries.Fixes #3439, #4171, #1003, #2990
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Contrib Repo Change?
Checklist: