Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify compression configuration for exporters #4775

Merged

Conversation

Donnerbart
Copy link
Contributor

@Donnerbart Donnerbart commented Sep 23, 2022

The GrpcExporterBuilder enables compression when none is configured.
The OkHttpExporterBuilder has no way to disable compression via none once it's set (which seems wrong for a mutable builder).
The JaegerGrpcSpanExporterBuilder and ZipkinSpanExporterBuilder have no configuration for compression at all.

  • Fix handling of compressionMethod none in GrpcExporterBuilder
  • Fix handling of compressionMethod none in OkHttpExporterBuilder
  • Add compression configuration to JaegerGrpcSpanExporterBuilder
  • Add compression configuration to ZipkinSpanExporterBuilder

Note: All exporters except ZipkinSpanExporterBuilder default to compression disabled. In Zipkin the internally used HttpSender.Builder has compressionEnabled = true. This behavior was not changed, so the ZipkinSpanExporterBuilder still enables compression by default.

Resolves #1652 Add GZip encoding support to Zipkin

@Donnerbart Donnerbart requested a review from a team September 23, 2022 03:15
@Donnerbart Donnerbart force-pushed the 1652-unify-compression-configuration branch from 938b9dd to ac8af97 Compare September 23, 2022 05:51
@codecov
Copy link

codecov bot commented Sep 23, 2022

Codecov Report

Base: 90.79% // Head: 90.92% // Increases project coverage by +0.13% 🎉

Coverage data is based on head (1457bee) compared to base (b5ac8c5).
Patch coverage: 94.44% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4775      +/-   ##
============================================
+ Coverage     90.79%   90.92%   +0.13%     
+ Complexity     4839     4808      -31     
============================================
  Files           554      545       -9     
  Lines         14422    14340      -82     
  Branches       1402     1383      -19     
============================================
- Hits          13094    13039      -55     
+ Misses          910      894      -16     
+ Partials        418      407      -11     
Impacted Files Coverage Δ
...try/exporter/zipkin/ZipkinSpanExporterBuilder.java 97.72% <90.90%> (-2.28%) ⬇️
...ry/exporter/internal/grpc/GrpcExporterBuilder.java 98.76% <100.00%> (+4.93%) ⬆️
...xporter/internal/okhttp/OkHttpExporterBuilder.java 91.37% <100.00%> (-0.15%) ⬇️
...exporter/jaeger/JaegerGrpcSpanExporterBuilder.java 80.64% <100.00%> (+3.72%) ⬆️
...metry/sdk/autoconfigure/ResourceConfiguration.java 94.87% <0.00%> (-5.13%) ⬇️
...telemetry/sdk/trace/export/BatchSpanProcessor.java 91.03% <0.00%> (-2.07%) ⬇️
.../java/io/opentelemetry/sdk/resources/Resource.java 90.56% <0.00%> (-1.89%) ⬇️
.../aggregator/DoubleExponentialHistogramBuckets.java 88.03% <0.00%> (-0.77%) ⬇️
...in/java/io/opentelemetry/sdk/OpenTelemetrySdk.java 96.42% <0.00%> (ø)
.../io/opentelemetry/sdk/OpenTelemetrySdkBuilder.java 100.00% <0.00%> (ø)
... and 33 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Donnerbart Donnerbart force-pushed the 1652-unify-compression-configuration branch from 0899ed7 to 55c1d0e Compare October 5, 2022 10:12
Copy link
Member

@jack-berg jack-berg 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, but think we should keep the current behavior for the zipkin exporter and leave compression enabled by default.

@Donnerbart Donnerbart force-pushed the 1652-unify-compression-configuration branch from 55c1d0e to c46b177 Compare October 5, 2022 21:07
@github-actions
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 20, 2022
@jack-berg jack-berg removed the Stale label Oct 25, 2022
@jack-berg
Copy link
Member

@jkwatson please take a look when you have a chance

Copy link
Contributor

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

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

Just one small javadoc nit that would be nice to add.

@jack-berg jack-berg merged commit fa46f19 into open-telemetry:main Nov 1, 2022
@Donnerbart Donnerbart deleted the 1652-unify-compression-configuration branch February 9, 2023 22:45
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.

Add GZip encoding support to Zipkin
3 participants