docs(tracing): complete architecture, pipeline tuning, and operational runbooks for OTel ClickHouse - #846
docs(tracing): complete architecture, pipeline tuning, and operational runbooks for OTel ClickHouse#846blue4209211 wants to merge 1 commit into
Conversation
…l runbooks for OTel ClickHouse
There was a problem hiding this comment.
Code Review
This pull request significantly expands the documentation for OTel ClickHouse Tracing, adding a comprehensive pipeline architecture diagram, component references, tuning invariants, schema details, and troubleshooting runbooks. The review feedback highlights two important corrections: updating the OTel Collector namespace filter to correctly target resource-level attributes (resource.attributes instead of attributes) and fixing a naming inconsistency in the Mermaid diagram regarding the ClickHouseStatus telemetry field.
| error_mode: ignore | ||
| traces: | ||
| span: | ||
| - attributes["k8s.namespace.name"] == "kube-system" |
There was a problem hiding this comment.
In OpenTelemetry, k8s.namespace.name is a resource-level attribute rather than a span-level attribute. To correctly filter out spans from the kube-system namespace, you should reference it via resource.attributes instead of attributes.
| - attributes["k8s.namespace.name"] == "kube-system" | |
| - resource.attributes["k8s.namespace.name"] == "kube-system" |
| end | ||
|
|
||
| subgraph Consumer["4. Runner & Query Layer (Deployment)"] | ||
| RUN["runner Deployment<br/>• Initializes Materialized Columns<br/>• Executes analytical SQL via HTTP :8123<br/>• Heartbeat telemetry reports clickhouse_status"] |
There was a problem hiding this comment.
There is an inconsistency in the heartbeat telemetry field name. Line 274 documents the key as ClickHouseStatus, but the Mermaid diagram here refers to it as clickhouse_status. Update this to ClickHouseStatus for consistency with the actual telemetry payload.
| RUN["runner Deployment<br/>• Initializes Materialized Columns<br/>• Executes analytical SQL via HTTP :8123<br/>• Heartbeat telemetry reports clickhouse_status"] | |
| RUN["runner Deployment<br/>• Initializes Materialized Columns<br/>• Executes analytical SQL via HTTP :8123<br/>• Heartbeat telemetry reports ClickHouseStatus"] |
References
- API documentation must match the implementation, including any typos. Do not correct typos in documentation if they exist in the code, as this can break user copy-paste workflows.
Summary
This PR overhauls the OTel ClickHouse tracing documentation (
clickhouse-tracing.md), expanding the initial 55-line stub into a comprehensive, code-grounded architectural and operational manual grounded ink8s-agentandnode-agent.Key Improvements:
node-agenteBPF probes + application OTel SDKsopentelemetry-collector:4317/:4318clickhouse:9000/:8123runner).memory_limiter,filter/drop_namespaces,filter/drop_health_check,probabilistic_sampler,batch), highlighting Helm list override gotchas and memory backpressure mechanisms.otel_tracesMergeTree table schema, TTL retention (168h), internal log suppression (extraOverridesdroppingquery_log/part_log), and the 13 materialized columns managed byrunner.EnsureMaterializedColumnsfor fast-path queries.OOMKilleddiagnostics via internal metrics (otelcol_processor_dropped_spans_total).clickhouse-client.nodeAgent.enabled: truefor essential kernel network metrics.Verification:
k8s-agent/charts/nudgebee-agent/values.yaml,templates/_helpers.tpl, andrunner/pkg/clickhouse/.npm run build) indoc-serverwith 0 broken links or anchors.