Merged
Conversation
d5f3512 to
f424451
Compare
nikw9944
approved these changes
Apr 6, 2026
Add ClickHouse as a telemetry backend alongside the existing InfluxDB writer. Either backend can be independently enabled/disabled via environment variables.
- Use CLICKHOUSE_USER/CLICKHOUSE_PASS env vars to match codebase convention - Remove unnecessary doc comments - Requeue failed rows on flush error to prevent data loss - Use goose.NewProvider instead of global state functions
a4ea9ed to
4a74ef1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
solana_validator_icmp_probe,solana_validator_tpuquic_probe,doublezero_user_icmp_probeProbeWriterinterface so planners can be tested without a real ClickHouse connectionDiff Breakdown
~⅓ tests, ~½ core logic, remainder is migration scaffolding and dependency updates.
Key files (click to expand)
telemetry/global-monitor/internal/clickhouse/writer.go— new buffered ClickHouse writer with typed row structs per table, batch insert flush, andProbeWriterinterfacetelemetry/global-monitor/db/clickhouse/migrations/20260404000001_init.sql— initial migration creating 3 MergeTree tables with monthly partitioning and 90-day TTLtelemetry/global-monitor/internal/gm/planner_dz_icmp.go— addrecordClickHouseRow()for DZ user ICMP probes including Solana cross-reference fieldstelemetry/global-monitor/internal/gm/planner_sol_tpuquic.go— addrecordClickHouseRow()for Solana validator TPUQUIC probestelemetry/global-monitor/internal/gm/planner_sol_icmp.go— addrecordClickHouseRow()for Solana validator ICMP probestelemetry/global-monitor/internal/clickhouse/migrations.go— goose migration runner adapted for slogtelemetry/global-monitor/cmd/global-monitor/main.go— wire ClickHouse config via env vars, run migrations on startup, pass writer to runnertelemetry/global-monitor/internal/gm/runner.go— addClickHouseWriterto config, flush buffered rows at end of each tickTesting Verification