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/clickhouse] Add compress option to config, enabled by default #34365

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

SpencerTorres
Copy link
Member

Description:

This change adds a new compress option to the config and sets it to lz4 by default.

In the current version of the exporter, users must know to provide compress in the DSN URL to gain the network performance benefits of compression. The only way they would have known this before is if they copied the sample from the README, but this is likely replaced when they paste their server address.

ClickHouse has excellent compression for storage and network. It is recommended to enable it for clients such as the OTel exporter to improve performance.

In summary:

  • Added compress field to config
  • endpoint (DSN URL) and connection_params takes priority
  • If left empty from all sources, will default to lz4
  • Valid options are based on the underlying clickhouse-go driver: none (disabled), zstd, lz4 (default), gzip, deflate, br, true (lz4).

The true option comes from an older version of clickhouse-go and is an alias for lz4. To prevent unexpected changes in behavior, I have manually re-added this check to the config parser instead of assuming the driver will still interpret it as lz4.

Testing:

  • Updated unit tests for DSN + config parsing
  • Ran integration tests locally

Documentation:

  • Updated README config options list + sample
  • Added changelog

@SpencerTorres SpencerTorres requested a review from dmitryax as a code owner August 1, 2024 02:50
@SpencerTorres SpencerTorres requested a review from a team August 1, 2024 02:50
Copy link
Contributor

@Frapschen Frapschen left a comment

Choose a reason for hiding this comment

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

Added some comments, others LGTM.

@SpencerTorres
Copy link
Member Author

Resolved all review notes. Thanks!

@mx-psi mx-psi merged commit 71a6797 into open-telemetry:main Aug 8, 2024
154 checks passed
@github-actions github-actions bot added this to the next release milestone Aug 8, 2024
@SpencerTorres SpencerTorres deleted the compression-config branch August 9, 2024 03:18
f7o pushed a commit to f7o/opentelemetry-collector-contrib that referenced this pull request Sep 12, 2024
…ault (open-telemetry#34365)

**Description:**

This change adds a new `compress` option to the config and sets it to
`lz4` by default.

In the current version of the exporter, users must know to provide
`compress` in the DSN URL to gain the network performance benefits of
compression. The only way they would have known this before is if they
copied the sample from the README, but this is likely replaced when they
paste their server address.

ClickHouse has excellent compression for storage and network. It is
recommended to enable it for clients such as the OTel exporter to
improve performance.

In summary:
- Added `compress` field to config
- `endpoint` (DSN URL) and `connection_params` takes priority
- If left empty from all sources, will default to `lz4`
- Valid options are based on the underlying `clickhouse-go` driver:
`none` (disabled), `zstd`, `lz4` (default), `gzip`, `deflate`, `br`,
`true` (lz4).

The `true` option comes from an older version of `clickhouse-go` and is
an alias for `lz4`. To prevent unexpected changes in behavior, I have
manually re-added this check to the config parser instead of assuming
the driver will still interpret it as `lz4`.

**Testing:**
- Updated unit tests for DSN + config parsing
- Ran integration tests locally

**Documentation:**
- Updated README config options list + sample
- Added changelog

---------

Co-authored-by: Pablo Baeyens <[email protected]>
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.

4 participants