Course contentsShow
← Cloud and Infrastructure
Lesson 1954 of 2,98942. Observability - MetricsFree lesson

Exporters and Instrumentation

Using exporters to expose metrics from third-party systems and instrumenting applications with Prometheus client libraries.

Exporters and Instrumentation

You'll learn how to gather metrics from existing systems and add monitoring to your own applications using Prometheus.

What Are Exporters?

Not every system speaks Prometheus natively. Exporters act as translators—they sit between Prometheus and third-party systems (databases, web servers, hardware), converting system-specific metrics into Prometheus-compatible time-series data exposed at an HTTP endpoint.

Think of exporters as interpreters at a international conference: MySQL speaks "MySQL status variables," but Prometheus only understands its own metric format. The mysqld_exporter translates between them.

Popular exporters include:

  • node_exporter - exposes hardware and OS metrics (CPU, memory, disk)
  • mysqld_exporter - database connection pools, query performance
  • nginx_exporter - web server request rates, response times
  • blackbox_exporter - probes endpoints (HTTP, DNS, TCP checks)

Exporters run as separate processes that Prometheus scrapes, just like any other target.

What Is Instrumentation?

Instrumentation means adding monitoring code directly into your applications using Prometheus client libraries. Instead of relying on external exporters, your code exposes metrics about its own behavior.

Client libraries exist for Go, Python, Java, Ruby, and others. They provide the metric types you learned (Counter, Gauge, Histogram, Summary) as programming constructs. Your application increments counters, sets gauges, and exposes them at an HTTP endpoint (commonly /metrics).

This gives you business-level metrics: orders processed, payment failures, recommendation latency—things no generic exporter can know.

The Division of Labor

  • Exporters: Monitor things you didn't write (databases, infrastructure)
  • Instrumentation: Monitor your own application's internals

Key Takeaway: Exporters bridge Prometheus to third-party systems, while instrumentation embeds metrics directly in your application code—together they provide complete observability from infrastructure to business logic.