-
Notifications
You must be signed in to change notification settings - Fork 352
chore: split json otel collector to enable both during dev #1247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,10 +33,7 @@ services: | |
| OPAMP_SERVER_URL: 'http://host.docker.internal:${HYPERDX_OPAMP_PORT}' | ||
| CUSTOM_OTELCOL_CONFIG_FILE: '/etc/otelcol-contrib/custom.config.yaml' | ||
| # Uncomment to enable stdout logging for the OTel collector | ||
| # OTEL_SUPERVISOR_LOGS: 'true' | ||
| # Uncomment to enable JSON schema in ClickHouse | ||
| # Be sure to also set BETA_CH_OTEL_JSON_SCHEMA_ENABLED to 'true' in ch-server | ||
| # OTEL_AGENT_FEATURE_GATE_ARG: '--feature-gates=clickhouse.json' | ||
| OTEL_SUPERVISOR_LOGS: 'true' | ||
| volumes: | ||
| - ./docker/otel-collector/config.yaml:/etc/otelcol-contrib/config.yaml | ||
| - ./docker/otel-collector/supervisor_docker.yaml.tmpl:/etc/otel/supervisor.yaml.tmpl | ||
|
|
@@ -54,6 +51,37 @@ services: | |
| depends_on: | ||
| ch-server: | ||
| condition: service_healthy | ||
| otel-collector-json: | ||
| # image: otel/opentelemetry-collector-contrib:0.120.0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: remove the commented line |
||
| build: | ||
| context: ./docker/otel-collector | ||
| target: dev | ||
| environment: | ||
| CLICKHOUSE_ENDPOINT: 'tcp://ch-server:9000?dial_timeout=10s' | ||
| CLICKHOUSE_PROMETHEUS_METRICS_ENDPOINT: 'ch-server:9363' | ||
| HYPERDX_OTEL_EXPORTER_CLICKHOUSE_DATABASE: 'otel_json' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hardcode the target database |
||
| HYPERDX_API_KEY: ${HYPERDX_API_KEY} | ||
| HYPERDX_LOG_LEVEL: ${HYPERDX_LOG_LEVEL} | ||
| OPAMP_SERVER_URL: 'http://host.docker.internal:${HYPERDX_OPAMP_PORT}' | ||
| CUSTOM_OTELCOL_CONFIG_FILE: '/etc/otelcol-contrib/custom.config.yaml' | ||
| # Uncomment to enable stdout logging for the OTel collector | ||
| OTEL_SUPERVISOR_LOGS: 'true' | ||
| # Uncomment to enable JSON schema in ClickHouse | ||
| # Be sure to also set BETA_CH_OTEL_JSON_SCHEMA_ENABLED to 'true' in ch-server | ||
| OTEL_AGENT_FEATURE_GATE_ARG: '--feature-gates=clickhouse.json' | ||
| volumes: | ||
| - ./docker/otel-collector/config.yaml:/etc/otelcol-contrib/config.yaml | ||
| - ./docker/otel-collector/supervisor_docker.yaml.tmpl:/etc/otel/supervisor.yaml.tmpl | ||
| # Add a custom config file | ||
| - ./docker/otel-collector/dev.json.config.yaml:/etc/otelcol-contrib/custom.config.yaml | ||
| ports: | ||
| - '14318:4318' # OTLP http receiver | ||
| restart: always | ||
| networks: | ||
| - internal | ||
| depends_on: | ||
| ch-server: | ||
| condition: service_healthy | ||
| ch-server: | ||
| image: clickhouse/clickhouse-server:25.7-alpine | ||
| ports: | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -15,11 +15,45 @@ receivers: | |||
| # timeout: 10s | ||||
| # memory_limiter: | ||||
| # limit_mib: 2000 | ||||
| exporters: | ||||
| # fork data to otel-collector-json service (DEV ONLY) | ||||
| otlphttp/json: | ||||
| endpoint: http://otel-collector-json:4318 | ||||
| headers: | ||||
| authorization: "super-secure-ingestion-api-key" | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hyperdx/packages/api/.env.development Line 26 in b2f7e48
|
||||
| compression: gzip | ||||
| service: | ||||
| pipelines: | ||||
| metrics/hostmetrics: | ||||
| receivers: [hostmetrics] | ||||
| # attach existing processors | ||||
| processors: [memory_limiter, batch] | ||||
| # attach existing exporters | ||||
| exporters: [clickhouse] | ||||
| exporters: | ||||
| - clickhouse | ||||
| processors: | ||||
| - memory_limiter | ||||
| - batch | ||||
| receivers: | ||||
| - hostmetrics | ||||
| traces/json: | ||||
| exporters: | ||||
| - otlphttp/json | ||||
| processors: | ||||
| - memory_limiter | ||||
| - batch | ||||
| receivers: | ||||
| - otlp/hyperdx | ||||
| # Metrics hasn't used JSON attributes yet | ||||
| # metrics/json: | ||||
| # exporters: | ||||
| # - otlphttp/json | ||||
| # processors: | ||||
| # - memory_limiter | ||||
| # - batch | ||||
| # receivers: | ||||
| # - otlp/hyperdx | ||||
| logs/json: | ||||
| exporters: | ||||
| - otlphttp/json | ||||
| processors: | ||||
| - memory_limiter | ||||
| - batch | ||||
| receivers: | ||||
| - otlp/hyperdx | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| service: | ||
| pipelines: | ||
| # ignore rrweb events | ||
| logs/out-rrweb: | ||
| exporters: | ||
| - nop | ||
| processors: | ||
| - memory_limiter | ||
| - batch | ||
| receivers: | ||
| - routing/logs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,6 +67,7 @@ type CollectorConfig = { | |
| }; | ||
| }; | ||
| exporters?: { | ||
| nop?: null; | ||
| debug?: { | ||
| verbosity: string; | ||
| sampling_initial: number; | ||
|
|
@@ -184,6 +185,7 @@ export const buildOtelCollectorConfig = (teams: ITeam[]): CollectorConfig => { | |
| }, | ||
| }, | ||
| exporters: { | ||
| nop: null, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. used for disabling rrweb export (json-otel-collector) |
||
| debug: { | ||
| verbosity: 'detailed', | ||
| sampling_initial: 5, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, we should enable supervisor logs (easier debugging)