Observability & Monitoring
Send Databrain data to Elastic
Send traces, metrics and logs from a self-hosted Databrain backend to Elastic.
Before you start
- You read Send traces, metrics and logs to your tool.
- Elastic Cloud: the managed OTLP endpoint and an API key with the
event:writeprivilege for theapmapplication. - Self-managed Elastic: an OTLP endpoint that your Elastic stack exposes, such as an EDOT Collector gateway.
Steps
-
Run an OpenTelemetry Collector (
otel/opentelemetry-collector-contrib) with this config. SetELASTIC_OTLP_ENDPOINTandELASTIC_API_KEYon the Collector. Keep the space afterApiKey.receivers: otlp: protocols: http: endpoint: 0.0.0.0:4318 processors: batch: {} exporters: otlphttp/elastic: endpoint: ${env:ELASTIC_OTLP_ENDPOINT} headers: Authorization: "ApiKey ${env:ELASTIC_API_KEY}" service: pipelines: traces: receivers: [otlp] processors: [batch] exporters: [otlphttp/elastic] metrics: receivers: [otlp] processors: [batch] exporters: [otlphttp/elastic] logs: receivers: [otlp] processors: [batch] exporters: [otlphttp/elastic] -
Set these on the Databrain backend and restart it:
OTEL_ENABLED=true OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
Check it
In Kibana, open Observability > Applications. databrain-api shows up after a few requests.
If nothing arrives, check the Collector log first, then see Observability setup. Elastic reference: Elastic managed OTLP endpoint.