Generic OTLP Integration¶
Click-Dog exports traces via OTLP/gRPC, making it compatible with any backend that accepts OpenTelemetry traces. This includes Grafana Tempo, Jaeger, Zipkin (via OTEL Collector), Elastic APM, and others.
Packaged backend experiences
Generic OTLP export works today. Backend-specific dashboards, saved views, and alert recipes for Tempo, Jaeger, Elastic, and other receivers are being prioritized from user demand. If one of these would help your rollout, tell us which backend and which views matter via Support.
Direct OTLP Backend¶
If your backend supports OTLP gRPC natively (e.g., Grafana Tempo, Jaeger with OTLP receiver):
Click-Dog blocks on this page are fragments
Merge each exporters.otel example into a complete config such as the
minimal profile. The collector
examples are separate OpenTelemetry Collector configurations.
exporters:
otel:
- collector_address: tempo.internal:4317
service_name: click-dog-monitor
secure: true
filters:
# Compatibility default is raw. Prefer normalized_only or none when query
# literals may contain secrets or PII.
query_text_mode: normalized_only
tempo.internal is not on this host, so the exporter would use TLS even
without secure: true; writing it keeps the transport visible. If the
receiver serves plaintext, as a default Tempo or Jaeger OTLP receiver on 4317
does, write secure: false instead, or enable TLS on the receiver. click-dog
test tls --collector tempo.internal:4317 tells you which one it serves. See
OTLP transport.
The mode is applied before OTLP serialization and before multi-sink fan-out.
normalized_only omits db.statement and retains an explicitly labeled
bounded normalized preview only when ClickHouse provides one; it never falls
back to raw SQL. All privacy-restricting modes also drop span attribute values
carrying an HTTP query parameter so URL-encoded GET statements cannot bypass
db.statement shaping. See Query Text Export
Modes.
After configuring the backend, isolate OTLP delivery and then exercise the native ClickHouse tracing path:
sudo -u click-dog click-dog test export --config /etc/click-dog/click-dog.yaml
sudo -u click-dog click-dog test tracing --config /etc/click-dog/click-dog.yaml
Each sink is reported independently. PASS means the receiver accepted the batch, not that a downstream backend has indexed or rendered it.
Via OpenTelemetry Collector¶
For backends that don't support OTLP directly, use an OTEL Collector as a proxy.
Point collector_address at the Collector's OTLP receiver. A Collector on the
same host (localhost:4317) needs no secure key: plaintext is automatic
for a loopback collector. The receivers below listen without TLS, so a
Collector on another host or in-cluster Service needs secure: false, or a
tls block on its receiver and secure: true on the exporter:
exporters:
otel:
- collector_address: otel-collector.monitoring:4317
service_name: click-dog-monitor
secure: false # this Collector's receiver serves plaintext
Grafana Tempo¶
# otel-collector-config.yaml
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
otlp:
endpoint: tempo.internal:4317
tls:
insecure: true
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp]
Jaeger¶
# otel-collector-config.yaml
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
otlp:
endpoint: jaeger.internal:4317
tls:
insecure: true
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp]
Elastic APM¶
# otel-collector-config.yaml
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
otlp/elastic:
endpoint: apm-server.internal:8200
headers:
Authorization: "Bearer ${ELASTIC_APM_SECRET_TOKEN}"
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp/elastic]
Multiple Backends¶
Send traces to multiple destinations simultaneously:
# otel-collector-config.yaml
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
otlp/tempo:
endpoint: tempo.internal:4317
tls:
insecure: true
otlp/jaeger:
endpoint: jaeger.internal:4317
tls:
insecure: true
service:
pipelines:
traces:
receivers: [otlp]
exporters: [otlp/tempo, otlp/jaeger]
TLS Configuration¶
TLS with a publicly trusted certificate¶
exporters:
otel:
- collector_address: otel.example.com:4317
service_name: click-dog-monitor
secure: true
The collector's certificate is verified against the system trust store. With
secure omitted the result is the same, because the collector is not
loopback; renderers write the key for every remote collector so the transport
is visible.
Private CA¶
exporters:
otel:
- collector_address: otel-collector.internal:4317
service_name: click-dog-monitor
secure: true
ca_cert: /path/to/ca.pem
With ca_cert set, click-dog verifies the collector against that file alone,
not the system trust store.
Mutual TLS (mTLS)¶
exporters:
otel:
- collector_address: otel-collector.internal:4317
service_name: click-dog-monitor
secure: true
ca_cert: /path/to/ca.pem
client_cert: /path/to/client.pem
client_key: /path/to/client-key.pem
Both client_cert and client_key must be provided together for mTLS. A lone
half of the pair is an invalid configuration and causes click-dog validate
to fail.
ca_cert, client_cert, client_key, and insecure_skip_verify only apply
over TLS. With secure omitted, setting any of them selects TLS, even for a
localhost collector. With secure: false, any of them fails validation,
naming the exporter and the conflicting fields: remove secure: false to use
TLS, or remove the TLS settings.
Whenever the exporter uses TLS, click-dog validate checks that configured
ca_cert, client_cert, and client_key files are readable. Certificate
format and client certificate/key matching are checked when the TLS
connection is built. Use insecure_skip_verify: true only for testing.
A renewed client certificate needs no restart: Click-Dog re-reads
client_cert and client_key whenever it opens a connection to the
collector. ca_cert is read once at startup. See
Client certificate renewal.
Check a receiver before configuring it¶
click-dog test tls makes one handshake with the exporter's own TLS code and
reports whether export would accept the receiver, and why not: no TLS, a
certificate without a subjectAltName, a name mismatch, an expired or unknown
certificate, a required client certificate, or no HTTP/2. It also lists the
certificates the receiver sent, with SHA-256 fingerprints:
click-dog test tls --collector otel-collector.internal:4317
click-dog test tls --collector otel-collector.internal:4317 --ca-cert /path/to/ca.pem
click-dog test tls --collector otel-collector.internal:4317 --ca-cert /path/to/ca.pem \
--client-cert /path/to/client.pem --client-key /path/to/client-key.pem
For an exporter already in a config, click-dog test tls --config
/etc/click-dog/click-dog.yaml checks it with all its TLS settings, client
certificate included. Prefer it to openssl s_client, which accepts a
certificate named only in its Common Name and does not need HTTP/2, so it can
pass a receiver click-dog rejects. See
Check OTLP receiver TLS.
Self-signed collector¶
A self-signed certificate is its own CA, so ca_cert points at the
collector's certificate itself:
exporters:
otel:
- collector_address: otel-collector.internal:4317
service_name: click-dog-monitor
secure: true
ca_cert: /etc/click-dog/tls/ca.pem
With ca_cert set, click-dog trusts that file alone, not the system trust
store. The certificate must carry a subjectAltName for the address in
collector_address: a DNS name for a hostname, an IP address for an IP.
click-dog ignores the Common Name, so a certificate with only a CN fails with
"relies on legacy Common Name field". Generate one with a SAN:
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -days 365 \
-subj "/CN=otel-collector.internal" \
-addext "subjectAltName=DNS:otel-collector.internal" \
-keyout collector.key -out collector.crt
Configure the collector with collector.crt and collector.key, and give
click-dog collector.crt as ca_cert; the key never leaves the collector.
For a collector certificate issued by a private CA, use the CA certificate
instead, so a renewed collector certificate keeps verifying.
click-dog test tls --collector otel-collector.internal:4317 --ca-cert
collector.crt confirms the pair before you write the config.
The guided installer can do this for you: when the collector's certificate is
not in the system trust store, it shows the certificate's subject, SANs,
validity and SHA-256 fingerprint and asks whether to trust it (default no).
Compare the fingerprint on the collector host with
openssl x509 -in collector.crt -noout -fingerprint -sha256 before you
answer. An unattended install never trusts a certificate it was not given:
pass the file with install.sh install --otel-ca-cert FILE. See
Install.
insecure_skip_verify is not a fix for self-signed certificates
It encrypts the connection without authenticating the collector, so
anything on the network path can impersonate it and read every exported
span. Use ca_cert instead; keep insecure_skip_verify for short tests.
Batch size and retry implications¶
For live span batches, click-dog incrementally groups encoded OTLP spans into
gRPC requests targeting at most 3,500,000 bytes (3.5 MB), leaving headroom
below gRPC's common 4 MB default. If a collector still returns
ResourceExhausted for a multi-span request, click-dog bisects that request and
recursively sends the halves. A single span that receives
ResourceExhausted cannot be split and fails the export call. Other gRPC
errors are returned without an in-call retry.
Chunk delivery is all-or-nothing from the pipeline's accounting perspective.
If early chunks (or the first half of a bisection) succeed and a later send
fails, the exporter returns no accepted span keys. The next normal cycle then
retries the original batch, including chunks the collector already accepted.
Those spans retain their (trace_id, span_id), but downstream duplicate
handling is backend-specific. Monitor export errors and size limits rather than
assuming partial delivery is exactly-once.
monitor.max_query_length has two different effects depending on the path. On
the query_log fetch, including backfill and the analyze trace candidate search, it
adds a length(query) predicate that excludes longer rows outright. Scheduled
mode does not apply that predicate to the span-log fetch; there the key only
bounds the enriched query_log.normalized_query attribute. Query-family
rollups are a third case again: the analyze queries family rollups do not
take the key at all, bounding preview text with their own limit instead.
Exporter-specific max_query_length is what truncates outbound db.statement
on both the live and backfill export paths. See
Query Text Truncation.
Exported Data Format¶
Click-Dog exports standard OTLP trace data. Every span includes:
Resource Attributes¶
service.name: Configured viaexporters.otel[].service_name
Instrumentation Scope¶
- Scope name:
clickhouse
Span Fields¶
trace_id: Original ClickHouse trace ID (16 bytes)span_id: Original span ID (8 bytes)parent_span_id: Parent span ID (if any)name: Operation name from ClickHousekind: Span kind (INTERNAL, SERVER, CLIENT, PRODUCER, CONSUMER)start_time: Microsecond precision from ClickHouseend_time: Microsecond precision from ClickHousestatus: OK for live span-log spans; backfill query-log spans carry ERROR when the query failed (exception_code != 0)
Span Attributes¶
See Span Attributes Reference for the complete list.
Click-Dog Configuration¶
exporters:
otel:
- collector_address: your-endpoint:4317
service_name: click-dog-monitor
secure: true # false for a receiver that serves plaintext
max_query_length: 100000
The endpoint, service name, and certificate-path string fields support environment variable expansion:
With secure omitted, the transport is chosen from the expanded address, so
the same config gives plaintext when the variable holds localhost:4317 and
TLS when it holds a remote host. Write secure when the variable can name
either. An address that expands to no host, such as ${OTEL_COLLECTOR_HOST}:4317
with the variable unset, fails validation rather than dialing the local host.