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
This commit is contained in:
Warren 2025-05-21 22:56:18 -07:00 committed by GitHub
parent d9ab75710e
commit 86465a2027
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 14 additions and 7 deletions

View file

@ -0,0 +1,7 @@
---
"@hyperdx/api": patch
"@hyperdx/app": patch
"@hyperdx/common-utils": patch
---
fix: map CLICKHOUSE_SERVER_ENDPOINT to otelcol ch exporter 'endpoint' field

View file

@ -5,7 +5,7 @@ services:
context: ./docker/otel-collector
target: dev
environment:
CLICKHOUSE_SERVER_ENDPOINT: 'ch-server:9000'
CLICKHOUSE_ENDPOINT: 'tcp://ch-server:9000?dial_timeout=10s'
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
volumes:

View file

@ -22,7 +22,7 @@ services:
image: otel/opentelemetry-collector-contrib:0.120.0
environment:
CLICKHOUSE_PROMETHEUS_METRICS_ENDPOINT: 'ch-server:9363'
CLICKHOUSE_SERVER_ENDPOINT: 'ch-server:9000'
CLICKHOUSE_ENDPOINT: 'tcp://ch-server:9000?dial_timeout=10s'
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
volumes:

View file

@ -51,7 +51,7 @@ services:
otel-collector:
image: ${OTEL_COLLECTOR_IMAGE_NAME}:${IMAGE_VERSION}
environment:
CLICKHOUSE_SERVER_ENDPOINT: 'ch-server:9000'
CLICKHOUSE_ENDPOINT: 'tcp://ch-server:9000?dial_timeout=10s'
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
ports:
- '13133:13133' # health_check extension

View file

@ -11,7 +11,7 @@ export SERVER_URL="http://127.0.0.1:${HYPERDX_API_PORT:-8000}"
export FRONTEND_URL="${FRONTEND_URL:-${HYPERDX_APP_URL:-http://localhost}:${HYPERDX_APP_PORT:-8080}}"
# Internal Services
export CLICKHOUSE_SERVER_ENDPOINT="ch-server:9000"
export CLICKHOUSE_ENDPOINT="tcp://ch-server:9000?dial_timeout=10s"
export MONGO_URI="mongodb://db:27017/hyperdx"
export EXPRESS_SESSION_SECRET="hyperdx is cool 👋"

View file

@ -96,7 +96,7 @@ exporters:
sampling_initial: 5
sampling_thereafter: 200
clickhouse/rrweb:
endpoint: tcp://${env:CLICKHOUSE_SERVER_ENDPOINT}?dial_timeout=10s&compress=lz4
endpoint: ${env:CLICKHOUSE_ENDPOINT}
database: default
username: ${env:CLICKHOUSE_USER}
password: ${env:CLICKHOUSE_PASSWORD}
@ -109,7 +109,7 @@ exporters:
max_interval: 30s
max_elapsed_time: 300s
clickhouse:
endpoint: tcp://${env:CLICKHOUSE_SERVER_ENDPOINT}?dial_timeout=10s&compress=lz4
endpoint: ${env:CLICKHOUSE_ENDPOINT}
database: default
username: ${env:CLICKHOUSE_USER}
password: ${env:CLICKHOUSE_PASSWORD}

View file

@ -21,7 +21,7 @@ services:
file: ../../docker-compose.ci.yml
service: otel-collector
environment:
- CLICKHOUSE_SERVER_ENDPOINT=ch-server:9000
- CLICKHOUSE_ENDPOINT=tcp://ch-server:9000?dial_timeout=10s
- CLICKHOUSE_PROMETHEUS_METRICS_ENDPOINT=ch-server:9363
- HYPERDX_LOG_LEVEL=info
ports: