Monitoring & Observability: Warum Logs nicht reichen, Tracing hilft

A

Adil Sher

Author

Jul 28, 2026
8 min read
11 views
Monitoring & Observability: Warum Logs nicht reichen, Tracing hilft

Summary

Warum Sie gerade heute Ihren Log‑Ansatz über Bord werfen sollten

  1. Grundlagen: Monitoring vs. Observability

Erklärung

Konkretes Beispiel

Persönliche Einschätzung

  1. Beispiel 1 – Loki + Promtail + Grafana: Logs strukturiert erfassen

Erklärung

Konkrete Konfiguration

positions: filename: /tmp/positions.yaml

clients: - url: http://loki:3100/loki/api/v1/push

scrape_configs: - job_name: system static_configs: - targets: - localhost labels: job: varlogs path: /var/log/**/*.log

Persönliche Einschätzung

  1. Beispiel 2 – Jaeger Tracing in einem Go‑Microservice

Erklärung

Konkrete Implementierung (Go)

import ( "context" "log" "net/http"

<span class="s">"go.opentelemetry.io/otel"</span>
<span class="s">"go.opentelemetry.io/otel/exporters/jaeger"</span>
<span class="s">"go.opentelemetry.io/otel/trace"</span>
<span class="s">"go.opentelemetry.io/otel/sdk/trace"</span>

)

func initTracer() func(context.Context) error { // Jaeger‑Collector läuft auf localhost:14268 exp, err := jaeger.New(jaeger.WithCollectorEndpoint("http://localhost:14268/api/traces")) if err != nil { log.Fatalf("Jaeger exporter error: %v", err) } tp := trace.NewTracerProvider(trace.WithBatcher(exp)) otel.SetTracerProvider(tp) return tp.Shutdown }

func handler(w http.ResponseWriter, r *http.Request) { ctx, span := otel.Tracer("my‑service").Start(r.Context(), "handler") defer span.End() // Simulierter DB‑Call dbCall(ctx) w.Write([]byte("ok")) }

func dbCall(ctx context.Context) { _, span := otel.Tracer("my‑service").Start(ctx, "db‑query") defer span.End() // hier würde ein echter DB‑Aufruf stattfinden }

func main() { shutdown := initTracer() defer shutdown(context.Background()) http.HandleFunc("/", handler) log.Println("Listening on :8080") log.Fatal(http.ListenAndServe(":8080", nil)) }

Persönliche Einschätzung

  1. Beispiel 3 – OpenTelemetry Collector als zentraler Hub

Erklärung

Konkrete Konfiguration (collector-config.yaml)

exporters: prometheus: endpoint: "0.0.0.0:9090" jaeger: endpoint: "jaeger:14250" loki: endpoint: "http://loki:3100/api/prom/push"

service: pipelines: traces: receivers: [otlp] exporters: [jaeger] metrics: receivers: [otlp] exporters: [prometheus] logs: receivers: [otlp] exporters: [loki]

Persönliche Einschätzung

  1. Häufige Fehler beim Aufbau eines Observability‑Stacks
  1. Fazit & konkreter nächster Schritt

Source

This article discusses content originally published by at Dev.to.

Read the original article

Share this article

Written by Adil Sher

Full stack developer building high-traffic platforms, AI services, and custom web applications. Explore my portfolio, learn about my background, or get in touch.

Related Articles

I Was Wrong About Kubernetes Swap, And It Actually Matters Now
DevOps & Cloud Oct 6

I Was Wrong About Kubernetes Swap, And It Actually Matters Now

I spent the last three years telling anyone who'd listen that swap in Kubernetes was a terrible idea. "Just buy more RAM," I'd say confidently, usually while configuring another overprovisioned node pool. Then I got a project involving AI agent workloads, and suddenly my certaint...

The Day I Realized My CI/CD Pipeline Was Quietly Bleeding Money
DevOps & Cloud Sep 26

The Day I Realized My CI/CD Pipeline Was Quietly Bleeding Money

I spent three years assuming my deployment infrastructure was someone else's problem. I'd push code to GitHub, a pipeline would spin up somewhere in the cloud, and a few minutes later my app was live. It felt magical. It wasn't until I joined a team where the DevOps costs were ac...