Skip to Content

Observability & Monitoring

Send Databrain data to Grafana Cloud

Send traces, metrics and logs from a self-hosted Databrain backend to Grafana Cloud.

Before you start

  • You read Send traces, metrics and logs to your tool.
  • From your Grafana Cloud stack, the OpenTelemetry tile: the OTLP endpoint (it ends in /otlp) and the instance ID.
  • A Grafana Cloud access policy token that can write metrics, logs and traces.

Steps

  1. Run an OpenTelemetry Collector (otel/opentelemetry-collector-contrib) with this config. Set GRAFANA_CLOUD_OTLP_ENDPOINT, GRAFANA_CLOUD_INSTANCE_ID and GRAFANA_CLOUD_API_KEY on the Collector.

    receivers:
      otlp:
        protocols:
          http:
            endpoint: 0.0.0.0:4318
    
    processors:
      batch: {}
    
    extensions:
      basicauth/grafana:
        client_auth:
          username: ${env:GRAFANA_CLOUD_INSTANCE_ID}
          password: ${env:GRAFANA_CLOUD_API_KEY}
    
    exporters:
      otlphttp/grafana:
        endpoint: ${env:GRAFANA_CLOUD_OTLP_ENDPOINT}
        auth:
          authenticator: basicauth/grafana
    
    service:
      extensions: [basicauth/grafana]
      pipelines:
        traces:
          receivers: [otlp]
          processors: [batch]
          exporters: [otlphttp/grafana]
        metrics:
          receivers: [otlp]
          processors: [batch]
          exporters: [otlphttp/grafana]
        logs:
          receivers: [otlp]
          processors: [batch]
          exporters: [otlphttp/grafana]
  2. Set these on the Databrain backend and restart it:

    OTEL_ENABLED=true
    OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318

Check it

In Grafana Cloud, look for databrain-api in Application Observability, traces in Tempo, logs in Loki and metrics in Prometheus.

If nothing arrives, check the Collector log first, then see Observability setup. Grafana Cloud reference: Grafana OpenTelemetry Collector.