Apply Now Apply Now Apply Now
header_logo
Post thumbnail
DEVOPS

Monitoring with Prometheus, Grafana & OpenTelemetry 

By Vishalini Devarajan

Many development teams only discover production issues after users start complaining, simply because they lack visibility into how their systems are actually performing. Monitoring and observability solve this by giving teams real-time insight into metrics, logs, and traces before small issues become major outages. Understanding tools like Prometheus, Grafana, and OpenTelemetry is now a core skill for DevOps engineers and backend developers working with distributed systems in 2026.

Table of contents


  1. TL;DR Summary
  2. What Is the Difference Between Monitoring and Observability?
  3. The Three Pillars of Observability
  4. What Is Prometheus?
  5. What Is Grafana?
  6. What Is OpenTelemetry?
  7. How Prometheus, Grafana, and OpenTelemetry Work Together
  8. Conclusion
  9. FAQ
    • What is the difference between monitoring and observability? 
    • What is Prometheus used for? 
    • What is the role of Grafana in observability? 
    • What is OpenTelemetry and why is it important? 
    • What are the three pillars of observability? 
    • Does Grafana store metric data itself? 
    • How often does Prometheus collect metrics by default? 
    • Can OpenTelemetry work with Prometheus and Grafana together? 

TL;DR Summary

Monitoring and observability are practices used to understand the health, performance, and behavior of software systems in production. Prometheus collects and stores metrics, Grafana visualizes them through dashboards, and OpenTelemetry provides a standardized way to collect metrics, logs, and traces across distributed systems. Together, these tools form the foundation of modern observability stacks used to detect issues, debug failures, and understand system behavior at scale. 

Want to build practical DevOps and cloud monitoring skills with hands-on projects? Explore HCL GUVI’s Cloud Computing & DevOps Course, designed to help you build production-ready monitoring and infrastructure skills. 

What Is the Difference Between Monitoring and Observability?

Monitoring and observability are related but distinct concepts that are often confused.

  1. Monitoring is the practice of collecting and watching predefined metrics, like CPU usage or response time, to detect known problems through alerts and dashboards.
  2. Observability is a broader property of a system that describes how well you can understand its internal state from the external data it produces, including metrics, logs, and traces. Observability helps you investigate unknown or unexpected problems, not just the ones you anticipated in advance.
AspectMonitoringObservability
FocusKnown issues with predefined alertsUnknown issues requiring investigation
Data typesPrimarily metricsMetrics, logs, and traces together
Question answered“Is something wrong?”“Why is something wrong?”
ApproachReactive, alert-drivenExploratory, investigation-driven

In practice, modern systems need both: monitoring to catch known failure patterns quickly, and observability to debug the unexpected issues monitoring alone cannot explain.

Read More: Comprehensive Guide to Open-Source DevOps Monitoring Tools

The Three Pillars of Observability

Observability is commonly built on three core data types, often called the three pillars.

  1. Metrics: Numerical measurements over time, such as request count, error rate, or memory usage
  2. Logs: Timestamped, detailed records of discrete events within a system
  3. Traces: Records showing the path a single request takes as it moves through multiple services in a distributed system

Each pillar answers a different question. Metrics show you what is happening in aggregate. Logs show you the specific details of an event. Traces show you exactly where time was spent across a multi-service request.

Want to build practical DevOps and cloud monitoring skills with hands-on projects? Explore HCL GUVI’s Cloud Computing & DevOps Course, designed to help you build production-ready monitoring and infrastructure skills. 

What Is Prometheus?

Prometheus is an open-source monitoring system designed specifically for collecting and storing time-series metrics. It works on a pull model, meaning Prometheus actively scrapes metrics from configured targets at regular intervals, rather than waiting for applications to push data to it.

  1. How Prometheus Collects Metrics

Applications expose metrics on an HTTP endpoint, typically /metrics, in a simple text format:

http_requests_total{method=”GET”, status=”200″} 15420
http_requests_total{method=”POST”, status=”500″} 23
memory_usage_bytes 184549376

Prometheus scrapes this endpoint at a configured interval, commonly every 15 to 30 seconds, and stores the values as a time series.

  1. Basic Prometheus Configuration

A prometheus.yml configuration file defining scrape targets:

global:
  scrape_interval: 15s

scrape_configs:
  – job_name: “my_application”
    static_configs:
      – targets: [“localhost:8080”]

This tells Prometheus to scrape metrics from localhost:8080 every 15 seconds and store the resulting time-series data.

  1. Querying Metrics with PromQL

Prometheus includes its own query language called PromQL for analyzing collected metrics.

rate(http_requests_total[5m])

This query calculates the per-second rate of HTTP requests over the last 5 minutes, useful for understanding traffic trends and spotting sudden spikes or drops.

MDN

What Is Grafana?

Grafana is an open-source visualization tool that connects to data sources like Prometheus and displays metrics through customizable dashboards, graphs, and alerts.

Grafana does not collect data itself. It connects to a data source, such as Prometheus, and lets you build visual dashboards using the data already stored there.

  1. Connecting Grafana to Prometheus

After installing Grafana, you add Prometheus as a data source through the Grafana UI by specifying:

URL: http://localhost:9090
Access: Server (default)

Once connected, you can build dashboard panels using PromQL queries directly in the Grafana interface, choosing from graph types like line charts, gauges, and heatmaps.

  1. Why Teams Use Grafana Specifically

Grafana supports multiple data sources beyond Prometheus, including Elasticsearch, InfluxDB, and CloudWatch, letting teams build unified dashboards that combine metrics from different systems in one place. Its alerting feature can also notify teams through Slack, email, or PagerDuty when a metric crosses a defined threshold.

What Is OpenTelemetry?

OpenTelemetry, often abbreviated as OTel, is an open-source observability framework that provides a standardized way to generate, collect, and export metrics, logs, and traces from applications, regardless of which backend tool you eventually send that data to.

Before OpenTelemetry, different observability tools each required their own proprietary instrumentation code, making it difficult to switch tools later without rewriting application code. OpenTelemetry solves this with vendor-neutral instrumentation.

  1. Basic OpenTelemetry Tracing Example (Python)
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor

trace.set_tracer_provider(TracerProvider())
tracer = trace.get_tracer(__name__)

span_processor = SimpleSpanProcessor(ConsoleSpanExporter())
trace.get_tracer_provider().add_span_processor(span_processor)

with tracer.start_as_current_span(“process_order”):
    print(“Processing order…”)

This creates a trace span around the process_order operation, recording how long it takes and allowing it to be exported to any compatible backend like Jaeger, Tempo, or a commercial observability platform.

  1. Why OpenTelemetry Matters

Because OpenTelemetry is vendor-neutral, teams can instrument their code once and switch observability backends later, such as moving from a self-hosted Jaeger setup to a commercial platform, without rewriting instrumentation throughout their codebase.

💡 Did You Know?

Prometheus was originally developed at SoundCloud in 2012 and became the second project accepted into the Cloud Native Computing Foundation (CNCF) in 2016, shortly after Kubernetes. Its early integration with Kubernetes helped establish Prometheus as the de facto monitoring and alerting solution for cloud-native environments. Today, it is widely used across Kubernetes-based infrastructures to collect metrics, monitor system health, and power observability platforms at scale.

How Prometheus, Grafana, and OpenTelemetry Work Together

A typical modern observability stack combines all three tools, each handling a distinct role.

ToolRole
OpenTelemetryInstruments application code to generate metrics, logs, and traces
PrometheusCollects and stores the metrics data over time
GrafanaVisualizes the stored metrics through dashboards and alerts

In this setup, OpenTelemetry exports metrics in a Prometheus-compatible format, Prometheus scrapes and stores them, and Grafana queries Prometheus to render dashboards that engineers monitor daily.

💡 Did You Know?

Grafana began in 2014 as a fork of Kibana, created because its founder wanted stronger support for time-series data and the Graphite monitoring ecosystem. Over time, Grafana evolved into a full observability platform. Today, Grafana Labs also maintains Grafana Loki for log aggregation and Grafana Tempo for distributed tracing, enabling teams to visualize and analyze metrics, logs, and traces—the three core pillars of modern observability—through a unified interface.

Conclusion

Monitoring and observability have become essential disciplines as systems grow more distributed and complex, making it impossible to understand production behavior through guesswork alone. 

Prometheus, Grafana, and OpenTelemetry together form a widely adopted, open-source observability stack that covers metric collection, visualization, and standardized instrumentation across any backend.

FAQ

What is the difference between monitoring and observability? 

Monitoring tracks predefined metrics to detect known issues through alerts, while observability provides the broader data needed to investigate unknown or unexpected problems.

What is Prometheus used for? 

Prometheus collects and stores time-series metrics by scraping data from application endpoints at regular intervals, forming the foundation of most modern monitoring stacks.

What is the role of Grafana in observability? 

Grafana visualizes data from sources like Prometheus through customizable dashboards, graphs, and alerts, without collecting the underlying data itself.

What is OpenTelemetry and why is it important? 

OpenTelemetry is a vendor-neutral framework for generating metrics, logs, and traces, allowing teams to instrument code once and switch observability backends later without rewriting instrumentation.

What are the three pillars of observability? 

Metrics, logs, and traces. Metrics show aggregate system behavior, logs show specific event details, and traces show how requests move through distributed services.

Does Grafana store metric data itself? 

No. Grafana connects to external data sources like Prometheus, Elasticsearch, or InfluxDB and visualizes the data they store, rather than storing data on its own.

How often does Prometheus collect metrics by default? 

The scrape interval is configurable, but a common default is every 15 to 30 seconds, depending on the application’s monitoring requirements.

MDN

Can OpenTelemetry work with Prometheus and Grafana together? 

Yes. OpenTelemetry can export metrics in a Prometheus-compatible format, which Prometheus stores and Grafana then visualizes, forming a complete observability pipeline.

Success Stories

Did you enjoy this article?

Schedule 1:1 free counselling

Similar Articles

Loading...
Get in Touch
Chat on Whatsapp
Request Callback
Share logo Copy link
Table of contents Table of contents
Table of contents Articles
Close button

  1. TL;DR Summary
  2. What Is the Difference Between Monitoring and Observability?
  3. The Three Pillars of Observability
  4. What Is Prometheus?
  5. What Is Grafana?
  6. What Is OpenTelemetry?
  7. How Prometheus, Grafana, and OpenTelemetry Work Together
  8. Conclusion
  9. FAQ
    • What is the difference between monitoring and observability? 
    • What is Prometheus used for? 
    • What is the role of Grafana in observability? 
    • What is OpenTelemetry and why is it important? 
    • What are the three pillars of observability? 
    • Does Grafana store metric data itself? 
    • How often does Prometheus collect metrics by default? 
    • Can OpenTelemetry work with Prometheus and Grafana together?