PyCon 2016 in Portland, Or
hills next to breadcrumb illustration

Tuesday 4:15 p.m.–5 p.m.

Get Instrumented: How Prometheus Can Unify Your Metrics

Hynek Schlawack

Audience level:
Best Practices & Patterns


To get real time insight into your running applications you need to instrument them and collect metrics: count events, measure times, expose numbers. Sadly this important aspect of development was a patchwork of half-integrated solutions for years. Prometheus changed that and this talk will walk you through instrumenting your apps and servers, building dashboards, and monitoring using metrics.


Metrics are highly superior to logging in regards of understanding the past, presence, and future of your applications and systems. They are cheap to gather (just increment a number!) but setting up a metrics system to collect and store them is a major task. You may have heard of statsd, Riemann, Graphite, InfluxDB, or OpenTSB. They all look promising but on a closer look it’s apparent that some of those solutions are straight-out flawed and others are hard to integrate with each other or even to get up and running. Then came Prometheus and gave us independence of UDP, no complex math in your application, multi-dimensional data by adding labels to values (no more server names in your metric names!), baked in monitoring capabilities, integration with many common systems, and official clients for all major programming languages. In short: a *unified* way to gather, process, and present metrics. This talk will: 1. explain why you want to collect metrics, 1. give an overview of the problems with existing solutions, 1. try to convince you that Prometheus may be what you’ve been waiting for, 1. teach how to impress your co-workers with beautiful graphs and intelligent monitoring by putting a fully instrumented Python application into production, 1. and finally give you pointers on how to migrate an existing metrics infrastructure to Prometheus *or* how to integrate Prometheus therein.