$30 off During Our Annual Pro Sale. View Details »

OpenMetrics: Prometheus Unbound?

OpenMetrics: Prometheus Unbound?

The State of the Art of OpenMetrics and some fundamental novelties about it.

What it is? Why do we need it? In case we really need it.

Cloud_Native Rejekts EU 2019 - Barcelona, Spain - May 19th 2019.

Leonardo Di Donato

May 19, 2019
Tweet

More Decks by Leonardo Di Donato

Other Decks in Technology

Transcript

  1. 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

    View Slide

  2. 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

    View Slide

  3. 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

    View Slide

  4. 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

    View Slide

  5. 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

    View Slide

  6. 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

    View Slide

  7. 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

    View Slide

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

    View Slide