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

[OTLP Exporter] Add gzip compression support for OTLP/HTTP and OTLP/gRPC exporter. #2351

Closed
lalitb opened this issue Oct 9, 2023 · 4 comments · Fixed by #2530
Closed

[OTLP Exporter] Add gzip compression support for OTLP/HTTP and OTLP/gRPC exporter. #2351

lalitb opened this issue Oct 9, 2023 · 4 comments · Fixed by #2530
Assignees
Labels
bug Something isn't working help wanted Good for taking. Extra help will be provided by maintainers Stale triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@lalitb
Copy link
Member

lalitb commented Oct 9, 2023

As documented in Specs - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#opentelemetry-protocol-exporter

Compression: Compression key for supported compression types. Supported compression: gzip.

Default: No value [2]
Env vars: OTEL_EXPORTER_OTLP_COMPRESSION OTEL_EXPORTER_OTLP_TRACES_COMPRESSION OTEL_EXPORTER_OTLP_METRICS_COMPRESSION OTEL_EXPORTER_OTLP_LOGS_COMPRESSION

High level changes for OTLP HTTP Exporter:

High level changes for OTLP gRPC Exporter:

@lalitb lalitb added bug Something isn't working good first issue Good for newcomers help wanted Good for taking. Extra help will be provided by maintainers labels Oct 9, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 9, 2023
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

This issue is available for anyone to work on. Make sure to reference this issue in your pull request.
✨ Thank you for your contribution! ✨

@lalitb lalitb changed the title [OTLP Exporter] Add gzip compression support for gRPC and HTTP OTLP exporter [OTLP Exporter] Add gzip compression support for OTLP/HTTP and OTLP/gRPC exporter. Oct 9, 2023
@lalitb lalitb removed the good first issue Good for newcomers label Oct 9, 2023
@marcalff marcalff added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 9, 2023
@perhapsmaple
Copy link
Contributor

Hi @lalitb, I'm interested in working on this issue. It seems quite easy to add gzip compression to a grpc::Channel. However, I'm a little confused about the Http part. As far as I can understand, we have to send a curl request with the CURL_ACCEPT_ENCODING set to "gzip", and check the server's response for a Content-Encoding header. Do we have to do this once in OtlpHttpClient before Posting data or do we have to modify ext::http::client to send a HEAD request and wait for a response from the server before every POST request. I'm new to curl so I may have gotten some things incorrectly. Any help regarding this is appreciated.
Thanks

@lalitb
Copy link
Member Author

lalitb commented Nov 1, 2023

@perhapsmaple Thanks for volunteering for this. Although the check should be done once during startup, I feel we can ignore this step for now. It should be safe to assume that most of the HTTP servers in modern web infrastructure would support gzip encoding. We can revisit it later if there are exceptions.
Have assigned it to you, feel free to ask any further questions.

Copy link

github-actions bot commented Jan 2, 2024

This issue was marked as stale due to lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Good for taking. Extra help will be provided by maintainers Stale triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
3 participants