Prometheus instrumentation: the Practical Way
Talkat PrometheusDay Europe 2022 · on Tuesday, 2022-05-17· at 11:25· Pavilion 3, Room F | Level 2 | Central Forum + Live Stream, Feria Valencia, Spain + Live Stream·
summary
Example code uses prometheus client_golang and a Thanos compaction microservice to show concrete instrumentation: simulating compaction to count blocks without running the job, exposing gauge vectors per group and resetting them after processing, recording ingestion latencies with histograms, and adding error counters. Demonstrates using a custom registry instead of default metrics, contrasts promauto vs explicit registration for error handling, and verifies behavior with table-driven unit tests that read metric values by label.
AI-written summary · about
chapters (18)
- 0:00Intro
- 0:17About me
- 0:36Outline
- 1:05Prometheus model
- 1:48Instrumentation vs exporter
- 2:17Four stage process
- 3:20Metrics
- 5:14Getting metrics data
- 6:15Downsampling process
- 6:35Grouping
- 12:52Create topic
- 16:05Message latency
- 17:20Deleting gauges
- 17:46Table testing
- 18:21Creating topics
- 18:54Sending messages
- 19:05Subtests
- 19:40Questions
related talks
27mGrand Treatise of Modern Instrumentation and Orchestration
30mIntro: Prometheus
42mPrometheus Intro and Deep Dive
47mGet Instrumented: How Prometheus Can Unify Your Metrics
33mPrometheus Project Intro
02h 43mPrometheus from A to Z
31mHow to Export Prometheus Metrics from Just About Anything
33mIntro: Prometheus
