Skip to content

opentelemetry-exporter-http-transport: default to urllib3 transport only when requests-specific env vars are absent - #5711

Open
herin049 wants to merge 2 commits into
open-telemetry:mainfrom
herin049:fix/urllib3-proxies
Open

herin049 wants to merge 2 commits into
open-telemetry:mainfrom
herin049:fix/urllib3-proxies

Conversation

@herin049

Copy link
Copy Markdown
Contributor

Description

Default to the urllib3 transport for HTTP exporters only when requests-specific environment variables are absent.

Fixes #5710

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tox

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

…nly when requests-specific env vars are absent
@herin049
herin049 requested a review from a team as a code owner September 29, 2026 15:18
@herin049
herin049 requested a balanced review from Copilot September 29, 2026 15:18
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Waiting on the author · refreshed 2026-09-30 08:43 UTC

Respond to 1 review item (e.g. link a commit, explain why not, ask a follow-up):

  • Top-level threads: 1
Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Should this be with reviewers? Comment /dashboard route:reviewers to route it to them.
  • Anything wrong — including the routing? Report it with what you expected; it helps us improve the dashboard.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

CA-bundle environment variables are incorrectly matched case-insensitively on POSIX.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes #5710 by selecting the requests transport when proxy or CA-bundle environment configuration requires it.

Changes:

  • Adds environment-aware default transport selection.
  • Applies selection to protobuf and JSON OTLP exporters.
  • Adds tests, documentation, and changelog coverage.
File Description
.changelog/​5711.fixed Records the transport-selection fix.
exporter/​opentelemetry-exporter-http-transport/​README.rst Documents proxy and CA-bundle behavior.
exporter/​opentelemetry-exporter-http-transport/​src/​opentelemetry/​exporter/​http/​transport/​__init__.py Implements environment-aware selection.
exporter/​opentelemetry-exporter-http-transport/​tests/​test_load_transport.py Tests selection and fallback behavior.
exporter/​opentelemetry-exporter-otlp-json-http/​src/​opentelemetry/​exporter/​otlp/​json/​http/​_internal.py Uses dynamic default selection.
exporter/​opentelemetry-exporter-otlp-json-http/​tests/​test_internal.py Tests JSON exporter integration.
exporter/​opentelemetry-exporter-otlp-proto-http/​src/​opentelemetry/​exporter/​otlp/​proto/​http/​_common/​__init__.py Uses dynamic selection without an explicit session.
exporter/​opentelemetry-exporter-otlp-proto-http/​tests/​test_common.py Tests protobuf exporter integration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@xrmx xrmx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @emdneto that maybe is better to revert to requests as default and list urllib3 limitation instead. Once we close the gaps we can switch again.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

opentelemetry-exporter-otlp-proto-http: 1.45.0 ignores HTTPS_PROXY (default urllib3 transport)

3 participants