mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
Closes HDX-3361 # Summary This PR prevents various query errors caused by references to `bodyExpression` on trace sources. The `bodyExpression` should not exist on trace sources, and cannot be edited in the source form. Despite that, the `bodyExpression` would be set on trace sources during source inference. - The `getEventBody` helper function will now correctly use the `spanNameExpression` field instead for trace sources. A few direct references to `bodyExpression` have been updated to `getEventBody` calls. - Source configuration inference will no longer populate the `bodyExpression` for trace sources, and the default trace source will not be created with a `bodyExpression`.
101 lines
6 KiB
YAML
101 lines
6 KiB
YAML
name: hdx-oss
|
|
services:
|
|
# ONLY USED FOR DEMO SSL SETUP
|
|
# nginx:
|
|
# image: nginx:1.27.3
|
|
# volumes:
|
|
# - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
|
|
# - ./docker/nginx/ssl:/etc/nginx/ssl
|
|
# - .volumes/nginx_logs:/var/log/nginx
|
|
# ports:
|
|
# - 80:80
|
|
# - 443:443
|
|
# networks:
|
|
# - internal
|
|
# depends_on:
|
|
# - app
|
|
db:
|
|
image: mongo:5.0.32-focal
|
|
volumes:
|
|
- .volumes/db:/data/db
|
|
# WARNING: Exposing the database port will make it accessible from outside the container,
|
|
# potentially allowing unauthorized access. If you uncomment the ports below,
|
|
# ensure to secure your database (e.g., with strong authentication, proper network rules, and firewalls).
|
|
# ports:
|
|
# - 27017:27017
|
|
networks:
|
|
- internal
|
|
otel-collector:
|
|
image: ${CH_IMAGE_REPO}/${NEXT_OTEL_COLLECTOR_IMAGE_NAME_DOCKERHUB}:${IMAGE_VERSION}
|
|
environment:
|
|
CLICKHOUSE_ENDPOINT: 'tcp://ch-server:9000?dial_timeout=10s'
|
|
HYPERDX_OTEL_EXPORTER_CLICKHOUSE_DATABASE: ${HYPERDX_OTEL_EXPORTER_CLICKHOUSE_DATABASE}
|
|
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
|
|
OPAMP_SERVER_URL: 'http://app:${HYPERDX_OPAMP_PORT}'
|
|
# TODO: use new schema
|
|
HYPERDX_OTEL_EXPORTER_CREATE_LEGACY_SCHEMA: 'true'
|
|
ports:
|
|
- '13133:13133' # health_check extension
|
|
- '24225:24225' # fluentd receiver
|
|
- '4317:4317' # OTLP gRPC receiver
|
|
- '4318:4318' # OTLP http receiver
|
|
- '8888:8888' # metrics extension
|
|
restart: always
|
|
networks:
|
|
- internal
|
|
depends_on:
|
|
- ch-server
|
|
app:
|
|
image: ${HDX_IMAGE_REPO}/${IMAGE_NAME_DOCKERHUB}:${IMAGE_VERSION}
|
|
ports:
|
|
- ${HYPERDX_API_PORT}:${HYPERDX_API_PORT}
|
|
- ${HYPERDX_APP_PORT}:${HYPERDX_APP_PORT}
|
|
environment:
|
|
FRONTEND_URL: ${HYPERDX_APP_URL}:${HYPERDX_APP_PORT}
|
|
HYPERDX_API_KEY: ${HYPERDX_API_KEY}
|
|
HYPERDX_API_PORT: ${HYPERDX_API_PORT}
|
|
HYPERDX_APP_PORT: ${HYPERDX_APP_PORT}
|
|
HYPERDX_APP_URL: ${HYPERDX_APP_URL}
|
|
HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL}
|
|
MINER_API_URL: 'http://miner:5123'
|
|
MONGO_URI: 'mongodb://db:27017/hyperdx'
|
|
SERVER_URL: http://127.0.0.1:${HYPERDX_API_PORT}
|
|
OPAMP_PORT: ${HYPERDX_OPAMP_PORT}
|
|
OTEL_EXPORTER_OTLP_ENDPOINT: 'http://otel-collector:4318'
|
|
OTEL_SERVICE_NAME: 'hdx-oss-app'
|
|
USAGE_STATS_ENABLED: ${USAGE_STATS_ENABLED:-true}
|
|
DEFAULT_CONNECTIONS:
|
|
'[{"name":"Local
|
|
ClickHouse","host":"http://ch-server:8123","username":"default","password":""}]'
|
|
DEFAULT_SOURCES:
|
|
'[{"from":{"databaseName":"default","tableName":"otel_logs"},"kind":"log","timestampValueExpression":"TimestampTime","name":"Logs","displayedTimestampValueExpression":"Timestamp","implicitColumnExpression":"Body","serviceNameExpression":"ServiceName","bodyExpression":"Body","eventAttributesExpression":"LogAttributes","resourceAttributesExpression":"ResourceAttributes","defaultTableSelectExpression":"Timestamp,ServiceName,SeverityText,Body","severityTextExpression":"SeverityText","traceIdExpression":"TraceId","spanIdExpression":"SpanId","connection":"Local
|
|
ClickHouse","traceSourceId":"Traces","sessionSourceId":"Sessions","metricSourceId":"Metrics"},{"from":{"databaseName":"default","tableName":"otel_traces"},"kind":"trace","timestampValueExpression":"Timestamp","name":"Traces","displayedTimestampValueExpression":"Timestamp","implicitColumnExpression":"SpanName","serviceNameExpression":"ServiceName","eventAttributesExpression":"SpanAttributes","resourceAttributesExpression":"ResourceAttributes","defaultTableSelectExpression":"Timestamp,ServiceName,StatusCode,round(Duration/1e6),SpanName","traceIdExpression":"TraceId","spanIdExpression":"SpanId","durationExpression":"Duration","durationPrecision":9,"parentSpanIdExpression":"ParentSpanId","spanNameExpression":"SpanName","spanKindExpression":"SpanKind","statusCodeExpression":"StatusCode","statusMessageExpression":"StatusMessage","connection":"Local
|
|
ClickHouse","logSourceId":"Logs","sessionSourceId":"Sessions","metricSourceId":"Metrics"},{"from":{"databaseName":"default","tableName":""},"kind":"metric","timestampValueExpression":"TimeUnix","name":"Metrics","resourceAttributesExpression":"ResourceAttributes","metricTables":{"gauge":"otel_metrics_gauge","histogram":"otel_metrics_histogram","sum":"otel_metrics_sum","_id":"682586a8b1f81924e628e808","id":"682586a8b1f81924e628e808"},"connection":"Local
|
|
ClickHouse","logSourceId":"Logs","traceSourceId":"Traces","sessionSourceId":"Sessions"},{"from":{"databaseName":"default","tableName":"hyperdx_sessions"},"kind":"session","timestampValueExpression":"TimestampTime","name":"Sessions","displayedTimestampValueExpression":"Timestamp","implicitColumnExpression":"Body","serviceNameExpression":"ServiceName","bodyExpression":"Body","eventAttributesExpression":"LogAttributes","resourceAttributesExpression":"ResourceAttributes","defaultTableSelectExpression":"Timestamp,ServiceName,SeverityText,Body","severityTextExpression":"SeverityText","traceIdExpression":"TraceId","spanIdExpression":"SpanId","connection":"Local
|
|
ClickHouse","logSourceId":"Logs","traceSourceId":"Traces","metricSourceId":"Metrics"}]'
|
|
networks:
|
|
- internal
|
|
depends_on:
|
|
- ch-server
|
|
- db
|
|
ch-server:
|
|
image: clickhouse/clickhouse-server:25.6-alpine
|
|
# WARNING: Exposing the database port will make it accessible from outside the container,
|
|
# potentially allowing unauthorized access. If you uncomment the ports below,
|
|
# ensure to secure your database (e.g., with strong authentication, proper network rules, and firewalls).
|
|
# ports:
|
|
# - 8123:8123 # http api
|
|
# - 9000:9000 # native
|
|
environment:
|
|
# default settings
|
|
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
|
|
volumes:
|
|
- ./docker/clickhouse/local/config.xml:/etc/clickhouse-server/config.xml
|
|
- ./docker/clickhouse/local/users.xml:/etc/clickhouse-server/users.xml
|
|
- .volumes/ch_data:/var/lib/clickhouse
|
|
- .volumes/ch_logs:/var/log/clickhouse-server
|
|
restart: on-failure
|
|
networks:
|
|
- internal
|
|
networks:
|
|
internal:
|