Skip to main content

Integrating Databrain with Kloudfuse

This guide explains how to send OpenTelemetry traces and metrics from your self-hosted Databrain instance to Kloudfuse.

Prerequisites

  • Databrain self-hosted version with OpenTelemetry support
  • Kloudfuse account with OTLP ingestion enabled
  • Your Kloudfuse OTLP endpoint URL

Configuration

1. Get Your Kloudfuse OTLP Endpoint

In your Kloudfuse console, locate your OTLP ingestion endpoint. It typically follows this format:
https://<your-kloudfuse-instance>.kloudfuse.io/otlp
Or if using the Kloudfuse collector deployed in your cluster:
http://kfuse-otel-collector.kloudfuse.svc.cluster.local:4318

2. Configure Databrain Environment Variables

Add these environment variables to your Databrain backend service:
# Enable OpenTelemetry
OTEL_ENABLED=true

# Kloudfuse OTLP endpoint (HTTP)
OTEL_EXPORTER_OTLP_ENDPOINT=https://<your-kloudfuse-instance>.kloudfuse.io/otlp

# Service name (appears in Kloudfuse UI)
OTEL_SERVICE_NAME=databrain-api

# Optional: Set log level for debugging
LOG_LEVEL=info

3. Docker Compose Configuration

Update your docker-compose.yml:
services:
  databrainbackend:
    environment:
      OTEL_ENABLED: "true"
      OTEL_EXPORTER_OTLP_ENDPOINT: "https://<your-kloudfuse-instance>.kloudfuse.io/otlp"
      OTEL_SERVICE_NAME: "databrain-api"
      LOG_LEVEL: "info"

4. Kubernetes Configuration

If deploying on Kubernetes, add to your deployment:
env:
  - name: OTEL_ENABLED
    value: "true"
  - name: OTEL_EXPORTER_OTLP_ENDPOINT
    value: "http://kfuse-otel-collector.kloudfuse.svc.cluster.local:4318"
  - name: OTEL_SERVICE_NAME
    value: "databrain-api"

What Gets Sent to Kloudfuse

Once configured, Databrain automatically sends:
Telemetry TypeDescription
TracesAPI request spans with timing, status codes, and errors
MetricsRequest latency histograms, error rates, throughput
LogsCorrelated logs with trace context (trace_id, span_id)

Verification

  1. Restart Databrain after configuration changes
  2. Make a few API requests to generate telemetry
  3. Check Kloudfuse UI:
    • Navigate to Traces → filter by service.name = databrain-api
    • Check Metrics for http.server.duration histograms
    • View Logs correlated with trace IDs

Troubleshooting

IssueSolution
No data in KloudfuseVerify OTEL_ENABLED=true and endpoint is reachable
Connection refusedCheck network connectivity and firewall rules
401/403 errorsVerify Kloudfuse API credentials if authentication is required
Missing tracesEnsure requests are being made; traces appear after ~30 seconds

Debug Mode

Enable debug logging to troubleshoot:
LOG_LEVEL=debug
Check Databrain logs for messages like:
OpenTelemetry initialized successfully
Exporting traces to: https://...

Support

For Kloudfuse-specific issues, contact Kloudfuse support. For Databrain configuration issues, contact your Databrain support team.