Skip to content

[EXPORTER] Allow custom HttpClient in OTLP HTTP#3930

Merged
marcalff merged 3 commits intoopen-telemetry:mainfrom
marcalff:custom_otlp_http_client
Mar 13, 2026
Merged

[EXPORTER] Allow custom HttpClient in OTLP HTTP#3930
marcalff merged 3 commits intoopen-telemetry:mainfrom
marcalff:custom_otlp_http_client

Conversation

@marcalff
Copy link
Member

@marcalff marcalff commented Mar 12, 2026

Fixes #3929

Changes

Please provide a brief description of the changes here.

  • In OtlpHttpClient, expose the constructor that accepts an arbitrary ext::http::client::HttpClient implementation as public, instead of private.
  • This allows an application to provide its own ext::http::client::HttpClient.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@codecov
Copy link

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.04%. Comparing base (af66d8d) to head (583d5f0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3930      +/-   ##
==========================================
- Coverage   90.07%   90.04%   -0.02%     
==========================================
  Files         226      226              
  Lines        7226     7226              
==========================================
- Hits         6508     6506       -2     
- Misses        718      720       +2     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcalff
Copy link
Member Author

Disclosure:

My application is using this to support a different authentication to an OTLP HTTP endpoint, contributing the change upstream.

@marcalff marcalff marked this pull request as ready for review March 12, 2026 19:49
@marcalff marcalff requested a review from a team as a code owner March 12, 2026 19:49
Copy link
Member

@dbarker dbarker left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks.

@marcalff marcalff merged commit c5ad161 into open-telemetry:main Mar 13, 2026
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EXPORTER] Allow custom HttpClient in OTLP HTTP

2 participants