[HDX-3994] Deprecate clickhouse.json feature gate in favor of per-exporter json config#2119
Conversation
🦋 Changeset detectedLatest commit: 414acd2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
E2E Test Results✅ All tests passed • 132 passed • 3 skipped • 1057s
Tests ran across 4 shards in parallel. |
af53cc6 to
0765526
Compare
a4cd25b to
5d5c046
Compare
🔴 Tier 4 — CriticalTouches auth, data models, config, tasks, OTel pipeline, ClickHouse, or CI/CD. Why this tier:
Review process: Deep review from a domain expert. Synchronous walkthrough may be required. Stats
|
5d5c046 to
f48d91c
Compare
PR Review
|
f48d91c to
e9c05ef
Compare
e9c05ef to
3e5d8be
Compare
…rter json config Replace the deprecated --feature-gates=clickhouse.json CLI flag with the per-exporter json: true config option, as recommended by the upstream OpenTelemetry ClickHouse exporter (v0.149.0). The old OTEL_AGENT_FEATURE_GATE_ARG env var is still supported for other feature gates. When it contains clickhouse.json, the entrypoint strips that specific gate, maps it to HYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLE=true, and prints a deprecation warning. Any remaining feature gates are preserved and passed through to the collector binary as before. Changes: - Add HYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLE env var as the new canonical config - Add json field to ClickHouse exporter configs in opampController.ts - Add json field to standalone config (config.standalone.yaml) - Migrate docker-compose.dev.yml to use new env var - Strip clickhouse.json from OTEL_AGENT_FEATURE_GATE_ARG with deprecation warning, preserving other feature gates - Add smoke tests for JSON exporter: column type verification and data insertion Ref: HDX-3994
3e5d8be to
2509aa5
Compare
Summary
Deprecate the upstream-deprecated
--feature-gates=clickhouse.jsonCLI flag in favor of the per-exporterjson: trueconfig option, as recommended by the OpenTelemetry ClickHouse exporter v0.149.0.This introduces a new env var
HYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLEthat controls JSON mode at the exporter config level. The oldOTEL_AGENT_FEATURE_GATE_ARGenv var remains backward-compatible — when it containsclickhouse.json, the entrypoint strips that gate, maps it to the new env var, and prints a deprecation warning. Other feature gates are preserved and passed through to the collector.Key changes:
docker/otel-collector/entrypoint.sh— Detectsclickhouse.jsoninOTEL_AGENT_FEATURE_GATE_ARG, strips it, setsHYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLE=true, and prints a deprecation warning. Remaining feature gates are still passed through to the collector in both standalone and supervisor modes.docker/otel-collector/config.standalone.yaml— Addedjson: ${env:HYPERDX_OTEL_EXPORTER_CLICKHOUSE_JSON_ENABLE:-false}to both ClickHouse exporter configspackages/api/src/opamp/controllers/opampController.ts— Addedjsonfield to theCollectorConfigtype and both ClickHouse exporter configs for OpAMP-managed collectorsdocker/otel-collector/supervisor_docker.yaml.tmpl— Feature gate pass-through preserved for non-clickhouse.jsongates (entrypoint strips the deprecated gate before supervisor template renders)smoke-tests/otel-collector/— Added a JSON-enabled otel-collector service and smoke tests verifying:ResourceAttributesandLogAttributescolumns inotel_logsareJSONtype (notMap)How to test locally or on Vercel
yarn devto start the dev stackotel-collector-jsoncontainer starts without errors (theclickhouse.jsonfeature gate is stripped, not passed to the collector)OTEL_AGENT_FEATURE_GATE_ARGcontainsclickhouse.jsonotel-collectorservice continues to work normally (json defaults to false)cd smoke-tests/otel-collector && bats json-exporter.batsReferences