Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Skip ConstLabels and namespace prefixes for "up" & internal metrics #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 13, 2021

  1. Skip ConstLabels and namespace prefixes for "up" & internal metrics

    Internal metrics consumed by Prometheus such as "up" indicate
    a status of the target, as either "up" with 1.0 or "down" with 0.0.
    This change ensures that no ConstLabels, nor namespace prefixes will
    be added to such metrics. This ensures that when one exports with
    the special name "up", that it passes through up to the Prometheus
    exporter, so:
    
        # HELP up up
        # TYPE up counter
        up{instance="localhost:9999"} 1
    
    instead of:
    
        # HELP tests_up tests/up
        # TYPE tests_up counter
        tests_up{instance="localhost:9999",service="spanner"} 1
    
    A further assertion can be added to ensure that "up" is a gauge,
    but I am not sure that it might be necessary, just in case some
    user wants to expose it as a counter.
    
    Updates open-telemetry/wg-prometheus#8
    odeke-em committed Apr 13, 2021
    Configuration menu
    Copy the full SHA
    3f51e17 View commit details
    Browse the repository at this point in the history