Book Consultation Submit Ticket

Practical Observability with Prometheus, Grafana, and OpenTelemetry

This post walks through a real-world scenario of diagnosing missing metrics and traces in a Kubernetes environment using Prometheus, Grafana, and OpenTelemetry, with step-by-step commands and risk mitigation.

Practical Observability with Prometheus, Grafana, and OpenTelemetry
Observability 6min 47 views 2026-07-10
KubernetesSREObservabilityPrometheusGrafanaOpenTelemetry

Scenario

Your e-commerce platform runs on Kubernetes. Users report slow checkout. SRE team sees P99 latency spike from 200ms to 2s, but CPU and memory are normal. OpenTelemetry traces show missing spans for database queries.

Symptoms

  • Grafana dashboard shows elevated P99 latency.
  • Prometheus metric http_request_duration_seconds increased, but node_cpu_seconds_total flat.
  • Trace waterfall incomplete—database spans absent.
  • No error logs.

Diagnosis

  1. Check OpenTelemetry Collector config: The collector config lacks a batch processor, causing span send delays.
  2. Verify Prometheus scrape targets: Ensure the collector's metrics endpoint is scraped.
  3. Inspect Collector logs: Run kubectl logs <otel-collector-pod>. See timeouts and retries.

Commands

Backup current config

kubectl get configmap otel-collector-config -o yaml > otel-collector-config.bak.yaml

Update and apply new config

Add batch processor:

processors:
  batch:
    timeout: 5s
    send_batch_size: 1000

Apply:

kubectl apply -f otel-collector-config.yaml
kubectl rollout restart deployment otel-collector

Verify Prometheus target

kubectl port-forward svc/otel-collector 8888
curl http://localhost:8888/metrics | grep otel

Risk Controls

  • Test config changes in staging first.
  • Use blue/green deployment for collector updates.
  • Backup current ConfigMap and Deployment.
  • Monitor collector resource usage to avoid OOM.

Rollback

If issues arise, rollback immediately:

kubectl apply -f otel-collector-config.bak.yaml
kubectl rollout restart deployment otel-collector

Verification

  1. Check Grafana: P99 latency should drop.2. OpenTelemetry traces now show database spans.3. Run PromQL: histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m])).

When to Submit an OpsGlobal Ticket

  • Issue persists after all steps.2. Core metrics or traces are completely missing.3. Need help optimizing collector performance or configuration.4. Suspect unknown infrastructure bottleneck.

Use cases

Useful for teams handling Observability issues and needing a clear troubleshooting and delivery workflow.

Problem background

This post walks through a real-world scenario of diagnosing missing metrics and traces in a Kubernetes environment using Prometheus, Grafana, and OpenTelemetry, with step-by-step commands and risk mitigation.

Troubleshooting steps

Confirm impact and recent changes, collect logs, configuration and metrics, then apply fixes from low to high risk.

Command examples

Replace sample resource names with real values and store passwords, tokens and keys in environment variables.

Risks

Before production changes, confirm backups, access boundaries, change windows and rollback paths.

Rollback plan

Keep original configuration and release versions; roll back config, images or database changes if metrics degrade.

Deliverables

Root-cause notes, key commands, remediation steps, verification results and follow-up recommendations.

!

Need help with a similar technical issue?

If your servers, Kubernetes, Docker, CI/CD, databases or monitoring systems have similar issues, submit logs and config files for remote diagnosis.

Ticket Contact on WhatsApp Consult