Skip to content

Commit 86465a2

Browse files
authored
fix: map CLICKHOUSE_SERVER_ENDPOINT to exporter 'endpoint' (#838)
For users connecting to ClickHouse Cloud or a TLS endpoint, add the `secure=true` query parameter or use the HTTPS protocol. Providing the full URL via the `CLICKHOUSE_SERVER_ENDPOINT` in the exporter's endpoint field should resolve this issue Ref: HDX-1743
1 parent d9ab757 commit 86465a2

File tree

7 files changed

+14
-7
lines changed

7 files changed

+14
-7
lines changed

.changeset/light-cats-agree.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@hyperdx/api": patch
3+
"@hyperdx/app": patch
4+
"@hyperdx/common-utils": patch
5+
---
6+
7+
fix: map CLICKHOUSE_SERVER_ENDPOINT to otelcol ch exporter 'endpoint' field

docker-compose.ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
context: ./docker/otel-collector
66
target: dev
77
environment:
8-
CLICKHOUSE_SERVER_ENDPOINT: 'ch-server:9000'
8+
CLICKHOUSE_ENDPOINT: 'tcp://ch-server:9000?dial_timeout=10s'
99
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
1010
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
1111
volumes:

docker-compose.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
image: otel/opentelemetry-collector-contrib:0.120.0
2323
environment:
2424
CLICKHOUSE_PROMETHEUS_METRICS_ENDPOINT: 'ch-server:9363'
25-
CLICKHOUSE_SERVER_ENDPOINT: 'ch-server:9000'
25+
CLICKHOUSE_ENDPOINT: 'tcp://ch-server:9000?dial_timeout=10s'
2626
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
2727
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
2828
volumes:

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ services:
5151
otel-collector:
5252
image: ${OTEL_COLLECTOR_IMAGE_NAME}:${IMAGE_VERSION}
5353
environment:
54-
CLICKHOUSE_SERVER_ENDPOINT: 'ch-server:9000'
54+
CLICKHOUSE_ENDPOINT: 'tcp://ch-server:9000?dial_timeout=10s'
5555
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
5656
ports:
5757
- '13133:13133' # health_check extension

docker/hyperdx/entry.local.base.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export SERVER_URL="http://127.0.0.1:${HYPERDX_API_PORT:-8000}"
1111
export FRONTEND_URL="${FRONTEND_URL:-${HYPERDX_APP_URL:-http://localhost}:${HYPERDX_APP_PORT:-8080}}"
1212

1313
# Internal Services
14-
export CLICKHOUSE_SERVER_ENDPOINT="ch-server:9000"
14+
export CLICKHOUSE_ENDPOINT="tcp://ch-server:9000?dial_timeout=10s"
1515
export MONGO_URI="mongodb://db:27017/hyperdx"
1616

1717
export EXPRESS_SESSION_SECRET="hyperdx is cool 👋"

docker/otel-collector/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ exporters:
9696
sampling_initial: 5
9797
sampling_thereafter: 200
9898
clickhouse/rrweb:
99-
endpoint: tcp://${env:CLICKHOUSE_SERVER_ENDPOINT}?dial_timeout=10s&compress=lz4
99+
endpoint: ${env:CLICKHOUSE_ENDPOINT}
100100
database: default
101101
username: ${env:CLICKHOUSE_USER}
102102
password: ${env:CLICKHOUSE_PASSWORD}
@@ -109,7 +109,7 @@ exporters:
109109
max_interval: 30s
110110
max_elapsed_time: 300s
111111
clickhouse:
112-
endpoint: tcp://${env:CLICKHOUSE_SERVER_ENDPOINT}?dial_timeout=10s&compress=lz4
112+
endpoint: ${env:CLICKHOUSE_ENDPOINT}
113113
database: default
114114
username: ${env:CLICKHOUSE_USER}
115115
password: ${env:CLICKHOUSE_PASSWORD}

smoke-tests/otel-collector/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ services:
2121
file: ../../docker-compose.ci.yml
2222
service: otel-collector
2323
environment:
24-
- CLICKHOUSE_SERVER_ENDPOINT=ch-server:9000
24+
- CLICKHOUSE_ENDPOINT=tcp://ch-server:9000?dial_timeout=10s
2525
- CLICKHOUSE_PROMETHEUS_METRICS_ENDPOINT=ch-server:9363
2626
- HYPERDX_LOG_LEVEL=info
2727
ports:

0 commit comments

Comments
 (0)