OpenTelemetry (OTEL)
This page shows how to enable distributed tracing for KalamDB with OTLP-compatible backends such as Jaeger.
Quick Start (Jaeger)
Download a ready-to-run compose file:
Run it from the folder where you downloaded it:
cd /path/to/downloaded/file
docker compose up -dJaeger UI: http://127.0.0.1:16686
This example mirrors the Jaeger section in KalamDB/docker/utils/docker-compose.yml.
Configure server.toml
KalamDB OTEL settings live under [logging.otlp]:
[logging.otlp]
enabled = true
endpoint = "http://127.0.0.1:4317"
protocol = "grpc"
service_name = "kalamdb-server"
timeout_ms = 3000Environment Variable Overrides
Environment variables override server.toml values at startup.
export KALAMDB_OTLP_ENABLED=true
export KALAMDB_OTLP_ENDPOINT="http://127.0.0.1:4317"
export KALAMDB_OTLP_PROTOCOL="grpc"
export KALAMDB_OTLP_SERVICE_NAME="kalamdb-prod"
export KALAMDB_OTLP_TIMEOUT_MS=5000KALAMDB_OTLP_ENABLED accepts "true", "1", or "yes" (case-insensitive).
Full OTEL Configuration Matrix
server.toml key | Environment variable | Default | Notes |
|---|---|---|---|
logging.otlp.enabled | KALAMDB_OTLP_ENABLED | false | Enables OTLP trace exporting. |
logging.otlp.endpoint | KALAMDB_OTLP_ENDPOINT | http://127.0.0.1:4317 | Collector endpoint. |
logging.otlp.protocol | KALAMDB_OTLP_PROTOCOL | grpc | Supported values: grpc, http. |
logging.otlp.service_name | KALAMDB_OTLP_SERVICE_NAME | kalamdb-server | Service name shown in tracing backend. |
logging.otlp.timeout_ms | KALAMDB_OTLP_TIMEOUT_MS | 3000 | Export timeout in milliseconds. |
Protocol behavior:
grpcexpects endpoint likehttp://127.0.0.1:4317(Jaeger port 4317)httpexpects collector HTTP endpoint likehttp://127.0.0.1:4318; the exporter appends/v1/tracesautomatically
Validation Checklist
- Start Jaeger/collector
- Start KalamDB with OTEL enabled
- Execute API requests or SQL calls
- Open Jaeger UI and confirm service name appears
Configuration Precedence
KalamDB applies settings in this order:
server.tomlKALAMDB_*environment overrides
If both are set, environment variables win.
Supported Backends
Any OTLP-compatible collector works with KalamDB, including:
- Jaeger (built-in compose example)
- Grafana Tempo
- Honeycomb
- Datadog (OTLP ingest)
- OpenTelemetry Collector (forwarding to any backend)
Related
Last updated on