You can use Grafana Cloud managed service as a backend for Odigos to store your logs, metrics, and traces. This page describes how to configure Odigos to use Grafana Cloud Loki as a logs backend.

Notice: these instructions are for the Grafan cloud managed Loki service. If you run a self hosted Loki instance, please follow the instructions in the Loki page.

All the connection details can be found at grafana.com under My Account

Then, under the “GRAFANA CLOUD” title, select your Grafana Stuck, browser to the “Loki” card and click “Send Logs”

Connection Settings

To send logs to Grafana Cloud Loki, you need to configure the following settings:

  • Endpoint - This is the URL of the Loki service. You can find it in grafana ui loki page as ”https://logs-prod-{REGION/SHARD}.grafana.net/loki/api/v1/push” or similar.
  • Username - You can find the loki username in the “Grafana Data Source settings” section as “User” value. The username is a number.
  • Password - This field is refered to as “password” or “Grafana.com API Token” in the Grafana Cloud UI. You can manage tokens in your “Account Settings” page under the “SECURITY” section in the “Access Policies” page. Make sure your token scope includes “logs:write” scope.

Loki Labels

Read about setting grafana loki labels in the Loki page.

Adding a Destination to Odigos

Odigos makes it simple to add and configure destinations, allowing you to select the specific signals [traces/logs/metrics] that you want to send to each destination. There are two primary methods for configuring destinations in Odigos:

  1. Using the UI
    To add a destination via the UI, follow these steps:
    • Use the Odigos CLI to access the UI: Odigos UI
    odigos ui
    
  • In the left sidebar, navigate to the Destination page.

  • Click Add New Destination

  • Select Grafana Cloud Loki and follow the on-screen instructions.

  1. Using kubernetes manifests

Save the YAML below to a file (e.g., destination.yaml) and apply it using kubectl:

kubectl apply -f destination.yaml
apiVersion: odigos.io/v1alpha1
kind: Destination
metadata:
  name: grafanacloudloki-example
  namespace: odigos-system
spec:
  data:
    GRAFANA_CLOUD_LOKI_ENDPOINT: <Endpoint>
    # GRAFANA_CLOUD_LOKI_LABELS: <Labels>
    # Note: The commented fields above are optional.
    GRAFANA_CLOUD_LOKI_USERNAME: <Username>
  destinationName: grafanacloudloki
  secretRef:
    name: grafanacloudloki-secret
  signals:
  - LOGS
  type: grafanacloudloki

---
apiVersion: v1
data:
  GRAFANA_CLOUD_LOKI_PASSWORD: <base64 Password (Api Token)>
kind: Secret
metadata:
  name: grafanacloudloki-secret
  namespace: odigos-system
type: Opaque