DevOps & Cloud

Monitoring & Observability: Warum Logs nicht reichen, Tracing hilft

A

Admin User

Author

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

Quantum Cryptography Broke My Messaging Pipeline (And Yours Might Be Next)
DevOps & Cloud Aug 3

Quantum Cryptography Broke My Messaging Pipeline (And Yours Might Be Next)

I had an incident last month that I've been turning over in my head ever since. One of our microservices started timing out on message processing—nothing catastrophic, but enough to trigger alerts. After digging through logs, I found the culprit: we'd added an extra validation la...

When Your Docker Image Bloats from 900MB to... Wait, How Did We Get Here?
DevOps & Cloud Aug 2

When Your Docker Image Bloats from 900MB to... Wait, How Did We Get Here?

I was debugging a deployment issue at 2 AM last week when I realized our production Docker image had somehow ballooned to nearly a gigabyte. A gigabyte. For a Node.js API that should've been maybe 150MB lean. That's when I came across this article about image size optimization, a...

Why I'm Finally Committing to Learning in Public (And Why You Should Too)
DevOps & Cloud Aug 1

Why I'm Finally Committing to Learning in Public (And Why You Should Too)

Last month, I spent three hours debugging a CloudFormation template that kept failing in a specific way. The error message was cryptic, the AWS docs were buried under twelve tabs of StackOverflow threads, and I was frustrated. When I finally figured it out—a simple missing proper...