Skip to content

Conversation

hannahhaering
Copy link
Contributor

@hannahhaering hannahhaering commented Sep 11, 2025

Implements #3961

Changes

  • Added support for gzip compression to the OTLP exporter (HTTP and gRPC)
  • Compression can be enabled via configuration/environment variables as per specification
  • The first 5 bytes of gRPC messages have previously been created in the corresponding (Log, Trace, Metrics) exporter, centralized this in the ExportClient
  • Added new tests for HTTP and gRPC export, with and without compression
  • Extended the configuration tests to cover the new, compression related options

Validation/Testing

  • Used the OpenTelemetry example Console application with compression enabled.
  • Verified that traces were successfully exported to the OpenTelemetry Collector using both HTTP and gRPC, with gzip compression enabled.
  • Confirmed that traces appeared correctly when routed through the collector.
  • Verified that disabling compression continues to work as before.

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)

@github-actions github-actions bot added the pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package label Sep 11, 2025
Copy link

codecov bot commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.83%. Comparing base (353bc85) to head (41dc747).
⚠️ Report is 43 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6494      +/-   ##
==========================================
+ Coverage   86.63%   86.83%   +0.20%     
==========================================
  Files         258      258              
  Lines       11878    11907      +29     
==========================================
+ Hits        10290    10340      +50     
+ Misses       1588     1567      -21     
Flag Coverage Δ
unittests-Project-Experimental 86.46% <100.00%> (-0.09%) ⬇️
unittests-Project-Stable 86.77% <100.00%> (+0.25%) ⬆️

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

Files with missing lines Coverage Δ
...ol/Implementation/ExportClient/OtlpExportClient.cs 100.00% <100.00%> (ø)
...mplementation/ExportClient/OtlpGrpcExportClient.cs 79.24% <100.00%> (+3.96%) ⬆️
...mplementation/ExportClient/OtlpHttpExportClient.cs 100.00% <100.00%> (ø)
...orter.OpenTelemetryProtocol/OtlpExporterOptions.cs 99.15% <100.00%> (+0.06%) ⬆️
....Exporter.OpenTelemetryProtocol/OtlpLogExporter.cs 88.00% <ø> (-1.66%) ⬇️
...porter.OpenTelemetryProtocol/OtlpMetricExporter.cs 77.27% <ø> (-3.50%) ⬇️
...xporter.OpenTelemetryProtocol/OtlpTraceExporter.cs 87.50% <ø> (-1.79%) ⬇️

... and 6 files with indirect coverage changes

@hannahhaering hannahhaering marked this pull request as ready for review September 11, 2025 20:20
@hannahhaering hannahhaering requested a review from a team as a code owner September 11, 2025 20:20
@rajkumar-rangaraj
Copy link
Contributor

@hannahhaering The OTLP Exporter currently lacks integration tests. With your proposed changes, did you test them with telemetry systems, and what were the results? Please update the PR description to include more details about how you tested with the collector or other services. It would be beneficial to verify with multiple sources.

@hannahhaering
Copy link
Contributor Author

@hannahhaering The OTLP Exporter currently lacks integration tests. With your proposed changes, did you test them with telemetry systems, and what were the results? Please update the PR description to include more details about how you tested with the collector or other services. It would be beneficial to verify with multiple sources.

I updated the PR description.

@github-actions github-actions bot added the documentation Documentation related label Sep 19, 2025
Copy link
Contributor

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Sep 27, 2025
@Kielek Kielek removed the Stale Issues and pull requests which have been flagged for closing due to inactivity label Sep 29, 2025
Copy link
Contributor

github-actions bot commented Oct 7, 2025

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or pushing will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Oct 7, 2025
@Kielek Kielek removed the Stale Issues and pull requests which have been flagged for closing due to inactivity label Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related 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.

6 participants