DevOps & Cloud

Monitoring & Observability: Warum Logs nicht reichen, Tracing hilft

A

Admin User

Author

Jul 28, 2026
8 min read
4 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

How We Solved Agent Auth Without a Single PAT
DevOps & Cloud Jul 26

How We Solved Agent Auth Without a Single PAT

A TOFU-based authorization model for headless AI agents By Mohamed Sherif If you’ve built an AI agent recently, you’ve probably run into the same problem. The first integration is easy. Your agent...

I Almost Lost a Production Database Before Learning to Listen to My Host
DevOps & Cloud Jul 25

I Almost Lost a Production Database Before Learning to Listen to My Host

Three years ago, I deployed a memory-intensive data processing pipeline on what I thought was a "well-provisioned" server. The application ran fine for weeks. Then one Tuesday morning—right in the middle of business hours—everything went silent. No crashes, no errors in the logs,...