Skip to content

Conversation

@sandy2008
Copy link
Contributor

Fixes #6764
Design discussion issue #6764

Changes

Add TLS-only support to the OTLP HTTP client factory while keeping mTLS behavior. Introduces OtlpTlsOptions, updates certificate loading/validation flow for CA-only and mTLS scenarios, and expands tests to cover TLS configuration paths.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@sandy2008 sandy2008 marked this pull request as ready for review December 29, 2025 07:05
@sandy2008 sandy2008 requested a review from a team as a code owner December 29, 2025 07:05
@github-actions github-actions bot added the pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package label Dec 29, 2025
@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

❌ Patch coverage is 94.59459% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.90%. Comparing base (866e218) to head (85b4f5b).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...tation/OpenTelemetryProtocolExporterEventSource.cs 60.00% 2 Missing ⚠️
...ocol/Implementation/OtlpSecureHttpClientFactory.cs 96.49% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6799      +/-   ##
==========================================
+ Coverage   86.88%   86.90%   +0.02%     
==========================================
  Files         262      263       +1     
  Lines       12350    12372      +22     
==========================================
+ Hits        10730    10752      +22     
  Misses       1620     1620              
Flag Coverage Δ
unittests-Project-Experimental 86.75% <94.59%> (-0.12%) ⬇️
unittests-Project-Stable 86.70% <94.59%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...yProtocol/Implementation/OtlpCertificateManager.cs 76.81% <100.00%> (+0.87%) ⬆️
...orter.OpenTelemetryProtocol/OtlpExporterOptions.cs 99.27% <100.00%> (ø)
....Exporter.OpenTelemetryProtocol/OtlpMtlsOptions.cs 100.00% <100.00%> (ø)
...y.Exporter.OpenTelemetryProtocol/OtlpTlsOptions.cs 100.00% <100.00%> (ø)
...tation/OpenTelemetryProtocolExporterEventSource.cs 82.17% <60.00%> (-1.16%) ⬇️
...ocol/Implementation/OtlpSecureHttpClientFactory.cs 90.58% <96.49%> (+3.92%) ⬆️

@rajkumar-rangaraj
Copy link
Member

@sandy2008 I have provided some important feedback. Please let me know once you have addressed these points.

@sandy2008
Copy link
Contributor Author

@rajkumar-rangaraj Please kindly review again, tyvm! And happy new year!

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

Labels

pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[OTLP] Make OTEL_EXPORTER_OTLP_CERTIFICATE independent from mTLS

2 participants