Home / Blog / Cloud & DevOps
Observability for Microservices: Logs, Metrics and Traces with Prometheus and Grafana
By Softworth Solutions · · 4 min read · For readers in UK, UAE, US, India

In short: Observability for microservices means you can answer new questions about production, like why checkout is slow for some users, without shipping new code. You get there by collecting metrics, logs and traces, linking them with shared IDs, and using a stack such as OpenTelemetry, Prometheus, Grafana, Loki and Tempo.
With a monolith, a slow page usually has one suspect. With twenty microservices, it could be any of them, or the network between them. That is why observability stops being a nice-to-have once you split your system up.
What are logs, metrics and traces for?
Each answers a different question. Metrics tell you what is happening across the system over time. Logs tell you exactly what happened in one event. Traces show the path of one request across services and where the time went.
| Signal | Best for | Common tool |
|---|---|---|
| Metrics | Dashboards, alerts, trends | Prometheus, Mimir or Thanos |
| Logs | Detailed event context | Loki |
| Traces | Cross-service latency and failures | Tempo or Jaeger |
| Instrumentation | Collecting all three consistently | OpenTelemetry |
The magic is in moving between them. An alert fires on a metric, a dashboard points to one service, an exemplar links to a slow trace and the trace links to that request's logs. Design for those links from day one.
How do Prometheus and Grafana work together?
Prometheus scrapes metrics from each service's HTTP endpoint and stores them as labelled time series. Grafana queries Prometheus with PromQL to build dashboards and alerts. On Kubernetes, kube-prometheus-stack discovers services automatically and ships cluster dashboards out of the box.
For long retention or high availability, add Thanos or Grafana Mimir, or use a managed Prometheus-compatible service. If you run Kubernetes already, our post on Kubernetes production lessons pairs well with this one.
What should you actually measure?
Use RED for every service: request rate, errors and duration as p50, p95 and p99 latency. Use USE for resources: utilisation, saturation and errors for CPU, memory, disks and connection pools. Add a few business metrics, such as orders placed or payments failed, which often reveal trouble before technical ones do.
Watch label cardinality. Putting user IDs or full URLs in metric labels creates a new series per value and can sink Prometheus. Keep that detail in logs and traces instead.

An illustrative example
Consider a Dubai food-delivery platform where some customers report slow order confirmation in the evening rush. Service dashboards look fine on average. A p99 latency panel shows the payment service spiking, and a trace exemplar reveals that each slow request waits on a third-party fraud check. The trace ID leads straight to logs showing timeouts and retries. The fix is a shorter timeout with an async fallback, found in an hour instead of a day of guesswork.
How do you add logs and traces?
Write logs as structured JSON with service, environment, level and, crucially, trace and span IDs. Loki indexes only a few labels and stores content cheaply in object storage. Instrument services with OpenTelemetry SDKs or auto-instrumentation, send everything to an OpenTelemetry Collector, and route traces to Tempo, metrics to Prometheus and logs to Loki.
Tracing every request is expensive at volume. Tail sampling in the Collector lets you keep every error or slow trace plus a small sample of normal ones. Never log passwords, tokens or raw personal data. If your users are in the UK, UAE or India, telemetry containing personal data falls under UK GDPR, the UAE PDPL or the DPDP Act, so mask at source and keep log storage in an appropriate region.
How do you build alerts people will not ignore?
- Define service level objectives for user-facing journeys, such as checkout success and latency.
- Alert on error-budget burn rate rather than on every internal blip.
- Page on-call only for urgent, actionable alerts; send the rest to a channel or ticket.
- Link every alert to a runbook and dashboard, and prune noisy alerts monthly.
For ten to thirty services, standing up this stack with dashboards and first alerts typically takes three to six weeks. Self-hosting avoids licence fees but costs engineering time, while telemetry storage can quietly become a big line on your cloud bill. Our cloud cost optimisation tactics help keep it in check.
Key facts
- Prometheus joined the Cloud Native Computing Foundation in 2016 as its second hosted project, after Kubernetes. (Prometheus)
- OpenTelemetry is a CNCF project formed in 2019 by merging the OpenTracing and OpenCensus projects. (OpenTelemetry)
- Google's Site Reliability Engineering guidance names four golden signals of monitoring: latency, traffic, errors and saturation. (Google SRE)
Key takeaways
- Collect metrics, logs and traces, and link them with shared trace IDs.
- Use RED and USE to decide what to measure, and watch label cardinality.
- Alert on user-facing SLOs, not every internal cause.
- Mask personal data in telemetry and store it in the right region.
SWS AI's cloud and DevOps team sets up observability for microservices and AI workloads. If you want a design that fits your scale and budget, get in touch.
Frequently asked questions
What is the difference between monitoring and observability?
Monitoring tracks conditions you chose to watch in advance, like error-rate thresholds. Observability is the broader ability to investigate unknown problems using rich, connected telemetry. Monitoring is part of observability.
Do I need OpenTelemetry if I already use Prometheus?
Not strictly for metrics, but OpenTelemetry is the most practical way to add distributed tracing with consistent context. It also keeps your instrumentation portable if you change back ends later.
Can we store logs and traces in the UAE or UK for compliance?
Yes. Self-hosted Loki and Tempo can run in UAE or UK cloud regions, and many managed services offer regional hosting. Check where backups and support access sit, not just the primary storage.
Planning an AI or software project? Talk to our team for a free consultation and an honest estimate.
Previous: Building Accessible Web Apps: A Practical WCAG Checklist
Next: AI in Hospitality and Food Delivery: Ordering, Routing and Support