OTLP HTTP: certifi default breaks TLS behind corporate SSL inspection on macOS/Windows

未关闭
#5,880 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python

调研方向

Start from the default _build_transport() in the OTLP HTTP exporter, where verify=True makes requests use certifi, and from how OTEL_EXPORTER_OTLP_CERTIFICATE already overrides it. The open question is the design: an opt-in env var, scoped to the exporter, that uses OS trust on darwin and win32 only when no explicit certificate is set. Settle that design with maintainers before coding. Done means the opt-in works behind a TLS-inspecting proxy and the default behaviour is unchanged.

由索引模型根据 Issue 内容生成。

描述

AI Disclosure: AI generated Issue, human directed.

Is your feature request related to a problem?

OTLP HTTP export fails on macOS/Windows behind TLS inspection (e.g. Zscaler): SSLCertVerificationError: unable to get local issuer certificate, while browsers trust the same host.

Default _build_transport() uses verify=True, so requests validates with certifi, not the OS trust store where inspection roots usually live. OTEL_EXPORTER_OTLP_CERTIFICATE works but requires every dev to export a PEM.

Describe the solution you'd like

Opt-in env (e.g. OTEL_EXPORTER_OTLP_HTTP_USE_SYSTEM_TRUST) to build the default OTLP HTTP requests session with OS-backed TLS on darwin/win32 when no explicit cert env is set—scoped to the exporter only (e.g. truststore on an HTTPAdapter, not global ssl monkeypatching).

Describe alternatives you've considered
  • OTEL_EXPORTER_OTLP_CERTIFICATE / custom PEM per machine
  • Custom session= or opentelemetry_otlp_credential_provider (works; not discoverable for typical OTLPSpanExporter / Phoenix setups)
Additional Context

Repro: HTTPS collector (e.g. https://<host>/v1/traces) from a corp-inspected network. SDK opentelemetry-exporter-otlp-proto-http 1.45.2, Python 3.14, macOS.

Would you like to implement a fix?

Yes

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

主要语言
Python
星标
2.7k
派生
1.1k
平均合并
3 天 12 小时
30 天内合并 PR
16

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

open-telemetry/opentelemetry-python 的其他 Issue

查看 open-telemetry/opentelemetry-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。