RousselTMLEARNING

← Back to the forum · 🛠️ Help with labs

Alloy : recevoir de l'OTLP et l'envoyer vers Tempo et Mimir

✓ Solved 📚 Alloy: From Discovery to Expertise

  1. Je remplace l'agent Grafana par Alloy. Comment écrire une configuration qui reçoit de l'OTLP et route traces et métriques ? La syntaxe me déroute un peu.

    👍 0
  2. ✓ Accepted answer

    Alloy assemble des composants reliés par leurs sorties (output) :

    otelcol.receiver.otlp "default" {
      grpc { }
      http { }
      output {
        traces  = [otelcol.processor.batch.default.input]
        metrics = [otelcol.processor.batch.default.input]
      }
    }
    
    otelcol.processor.batch "default" {
      output {
        traces  = [otelcol.exporter.otlp.tempo.input]
        metrics = [otelcol.exporter.prometheus.mimir.input]
      }
    }
    
    otelcol.exporter.otlp "tempo" {
      client { endpoint = "tempo:4317" }
    }
    
    otelcol.exporter.prometheus "mimir" {
      forward_to = [prometheus.remote_write.mimir.receiver]
    }
    
    prometheus.remote_write "mimir" {
      endpoint { url = "http://mimir:9009/api/v1/push" }
    }
    flowchart LR
      R[otelcol.receiver.otlp] --> B[processor.batch]
      B -->|traces| T[exporter.otlp tempo]
      B -->|metrics| P[exporter.prometheus] --> RW[remote_write mimir]

    L'interface d'Alloy (port 12345) affiche ce graphe et l'état de chaque composant : très utile pour déboguer.

    👍 0

Reply

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!