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

[exporter/elasticsearch] Enable gzip compression by default #35865

Merged
merged 16 commits into from
Oct 21, 2024

Conversation

carsonip
Copy link
Contributor

Description

Enable gzip compression by default, at hardcoded level BestSpeed. To disable compression, set compression to none.

Link to tracking issue

Testing

Documentation

@carsonip carsonip marked this pull request as ready for review October 18, 2024 08:26
@carsonip carsonip requested a review from a team as a code owner October 18, 2024 08:26
Copy link
Member

@lahsivjar lahsivjar left a comment

Choose a reason for hiding this comment

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

LGTM!

if cfg.Compression != "" {
// TODO support confighttp.ClientConfig.Compression
return errors.New("compression is not currently configurable")
if cfg.Compression != "none" && cfg.Compression != configcompression.TypeGzip {
Copy link
Member

Choose a reason for hiding this comment

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

TypeNone should work? https://github.com/open-telemetry/opentelemetry-collector/blob/v0.111.0/config/configcompression/compressiontype.go#L17

Suggested change
if cfg.Compression != "none" && cfg.Compression != configcompression.TypeGzip {
if cfg.Compression != configcompression.TypeNone && cfg.Compression != configcompression.TypeGzip {

Copy link
Member

Choose a reason for hiding this comment

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

We should also probably treat empty value "" (TypeEmpty) as valid.

Copy link
Contributor Author

@carsonip carsonip Oct 18, 2024

Choose a reason for hiding this comment

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

notice it is lowercase typeNone, not TypeNone, therefore it will not be possible to be referenced from es exporter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should also probably treat empty value "" (TypeEmpty) as valid.

With a non-empty default, I don't think it is possible to set it to empty.

@andrzej-stencel andrzej-stencel merged commit 1ef15b9 into open-telemetry:main Oct 21, 2024
158 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 21, 2024
Copy link
Member

@songy23 songy23 left a comment

Choose a reason for hiding this comment

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

TestExporterMetrics in elasticsearch exporter has been flaky on Windows since this commit e.g. https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/runs/11453791269/job/31866855448 May be related

@songy23
Copy link
Member

songy23 commented Oct 22, 2024

#35924

sbylica-splunk pushed a commit to sbylica-splunk/opentelemetry-collector-contrib that referenced this pull request Dec 17, 2024
…emetry#35865)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

Enable gzip compression by default, at hardcoded level BestSpeed. To
disable compression, set `compression` to `none`.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

<!--Please delete paragraphs that you did not use before submitting.-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants