Slide 1

Slide 1 text

OpenMetrics. Prometheus Unbound? Leonardo Di Donato. Open Source Engineer @ Sysdig. Maintainer of Falco. Co-creator of kubectl-trace. Creator of go-syslog. @leodido 2019.05.19 - Cloud_Native Rejekts EU - Barcelona, Spain

Slide 2

Slide 2 text

What OpenMetrics is? @leodido gh:openmetrics/openmetrics Just a wire protocol. A lingua franca in the whole observability story being built using the Prometheus exposition format as the starting point. It’s (still) a draft In the CNCF sandbox

Slide 3

Slide 3 text

Prometheus won the battle! Against no one ➡ there was hardly anyone in the landscape … Everyone knows it nowadays. It displays metrics line-by-line in a text-based format. Histograms, counters, gauges, summaries. N-dimensional space with labels. It is really good at doing metrics And what else?! ‍♂ So why do we really need OpenMetrics? Mess Prometheus OpenMetrics @leodido

Slide 4

Slide 4 text

Standardization Traditional vendors want to avoid lock-in. Goal ➡ IETF RFC Secret goal ➡ kill the concept of hierarchical data models Open Standard: • no brand. • vendor neutral. • available to all to read and implement ➡ foster cooperation. OpenMetrics @leodido

Slide 5

Slide 5 text

Novelties Mostly the same of Prometheus except ... UNIX timestamps in seconds What are you counting? # UNIT foo_seconds seconds ⬅ not applicable to state sets and info metrics UNIT descriptor directive # HELP test_m Bla bla bla description no one really reads # TYPE test_m counter # UNIT potatoes test_m{...} x test_m{...} x # EOF ⬅ Metric sets followed by an end marker attach an ID off a trace to directly link to that trace foo_bucket{le="0.1"} 8 # {} 0.054 foo_bucket{le="1"} 10 # {id="9856e"} 0.67 foo_bucket{le="10"} 17 # {id="12fa8"} 9.8 1520879607.789 ⬆ Exemplars Registered content-type/mime-type Normalization • same escape rules for HELP directive and labels • better handling of white spaces between tokens Maybe application/openmetrics-text? @leodido

Slide 6

Slide 6 text

New metric types Mostly the same of Prometheus except ... # TYPE x info x_info{entity="ctrl",name="pretty",version="8.1"} 1 x_info{entity="repl",name="prettier",version="8.2"} 1 Info metrics Just histograms for gauges. What else am I supposed to say? Gauge histograms # TYPE foo stateset foo{entity="controller",foo="a"} 0 foo{entity="controller",foo="b"} 1 foo{entity="replica",foo="a"} 0 foo{entity="replica",foo="b"} 1 # EOF State sets What Prometheus calls untyped metrics. Unknown @leodido

Slide 7

Slide 7 text

State of the Art. Prometheus Python Client >= 2.5.0 Do you want to verify your output is valid OpenMetrics? Google, Uber, OpenCensus ... ~2 years in the making, nothing more than this out there yet … Suggestions ● Better outward communication ● Test suite to let other developers build against it Give birth to it! @leodido

Slide 8

Slide 8 text

Thanks. Reach me out @leodido on twitter & github! SEE Y’ALL AROUND IN KUBECON http://bit.ly/openmetrics_bcn