You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[exporter/clickhouse] Add compress option to config, enabled by default (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]>
Copy file name to clipboardExpand all lines: exporter/clickhouseexporter/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -287,6 +287,7 @@ Connection options:
287
287
-`database` (default = default): The database name. Overrides the database defined in `endpoint` when this setting is not equal to `default`.
288
288
-`connection_params` (default = {}). Params is the extra connection parameters with map format. Query parameters provided in `endpoint` will be individually overwritten if present in this map.
289
289
-`create_schema` (default = true): When set to true, will run DDL to create the database and tables. (See [schema management](#schema-management))
290
+
-`compress` (default = lz4): Controls the compression algorithm. Valid options: `none` (disabled), `zstd`, `lz4` (default), `gzip`, `deflate`, `br`, `true` (lz4). Ignored if `compress` is set in the `endpoint` or `connection_params`.
290
291
-`async_insert` (default = true): Enables [async inserts](https://clickhouse.com/docs/en/optimize/asynchronous-inserts). Ignored if async inserts are configured in the `endpoint` or `connection_params`. Async inserts may still be overridden server-side.
0 commit comments