Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/configurable-clickhouse-exporter-timeout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@hyperdx/api': patch
'@hyperdx/otel-collector': patch
---

Allow the ClickHouse exporter request timeout to be configured with
`HYPERDX_OTEL_EXPORTER_TIMEOUT` in both OpAMP-managed and standalone collector
modes. The default remains 5 seconds.
12 changes: 6 additions & 6 deletions docker/otel-collector/config.standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ receivers:
protocols:
grpc:
include_metadata: true
endpoint: "0.0.0.0:4317"
endpoint: '0.0.0.0:4317'
http:
cors:
allowed_origins: ["*"]
allowed_headers: ["*"]
allowed_origins: ['*']
allowed_headers: ['*']
include_metadata: true
endpoint: "0.0.0.0:4318"
endpoint: '0.0.0.0:4318'

connectors:
routing/logs:
Expand All @@ -31,7 +31,7 @@ exporters:
username: ${env:CLICKHOUSE_USER}
ttl: 720h
logs_table_name: hyperdx_sessions
timeout: 5s
timeout: ${env:HYPERDX_OTEL_EXPORTER_TIMEOUT:-5s}
create_schema: ${env:HYPERDX_OTEL_EXPORTER_CREATE_LEGACY_SCHEMA:-false}
json: ${env:HYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLE:-false}
retry_on_failure:
Expand All @@ -45,7 +45,7 @@ exporters:
password: ${env:CLICKHOUSE_PASSWORD}
username: ${env:CLICKHOUSE_USER}
ttl: 720h
timeout: 5s
timeout: ${env:HYPERDX_OTEL_EXPORTER_TIMEOUT:-5s}
create_schema: ${env:HYPERDX_OTEL_EXPORTER_CREATE_LEGACY_SCHEMA:-false}
json: ${env:HYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLE:-false}
retry_on_failure:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ describe('opampController', () => {
resetConfig();
});

describe('buildOtelCollectorConfig ClickHouse exporters', () => {
it('allows both exporter timeouts to be configured from the collector environment', () => {
const cfg = buildOtelCollectorConfig([]);

expect(cfg.exporters).toMatchObject({
clickhouse: {
timeout: '${env:HYPERDX_OTEL_EXPORTER_TIMEOUT:-5s}',
},
'clickhouse/rrweb': {
timeout: '${env:HYPERDX_OTEL_EXPORTER_TIMEOUT:-5s}',
},
});
});
});

describe('buildOtelCollectorConfig datadog receiver', () => {
it('omits the datadog receiver when the flag is off (default)', () => {
configState.ENABLE_DATADOG_RECEIVER = false;
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/opamp/controllers/opampController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export const buildOtelCollectorConfig = (
password: '${env:CLICKHOUSE_PASSWORD}',
ttl: '${env:HYPERDX_OTEL_EXPORTER_TABLES_TTL:-720h}',
logs_table_name: 'hyperdx_sessions',
timeout: '5s',
timeout: '${env:HYPERDX_OTEL_EXPORTER_TIMEOUT:-5s}',
create_schema:
'${env:HYPERDX_OTEL_EXPORTER_CREATE_LEGACY_SCHEMA:-false}',
json: '${env:HYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLE:-false}',
Expand All @@ -270,7 +270,7 @@ export const buildOtelCollectorConfig = (
username: '${env:CLICKHOUSE_USER}',
password: '${env:CLICKHOUSE_PASSWORD}',
ttl: '${env:HYPERDX_OTEL_EXPORTER_TABLES_TTL:-720h}',
timeout: '5s',
timeout: '${env:HYPERDX_OTEL_EXPORTER_TIMEOUT:-5s}',
create_schema:
'${env:HYPERDX_OTEL_EXPORTER_CREATE_LEGACY_SCHEMA:-false}',
json: '${env:HYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLE:-false}',
Expand Down
Loading