(self, name: str, value: float, bucket_tag: str, buckets: List[int], bucket_unit: str = '',
                  tags: Dict[str, str] = None, documentation: str = '')
A cumulative histogram with a base metric name of <name> exposes multiple time series
        during a scrape:

        * cumulative counters for the observation buckets, exposed as
          `<name>_bucket{le="<upper inclusive bound>"}`
        * the total sum of all observed values, exposed as `<name>_sum`
        * the count of events that have been observed, exposed as `<name>_count`
          (identical to `<name>_bucket{le="+Inf"}` above)

        For example
        ::

            h = metrics_histogram(
                'commcare.request_duration', 1.4,
                bucket_tag='duration', buckets=[1,2,3], bucket_units='ms',
                tags=tags
            )

            # resulting metrics
            # commcare_request_duration_bucket{...tags..., le="1.0"} 0.0
            # commcare_request_duration_bucket{...tags..., le="2.0"} 1.0
            # commcare_request_duration_bucket{...tags..., le="3.0"} 1.0
            # commcare_request_duration_bucket{...tags..., le="+Inf"} 1.0
            # commcare_request_duration_sum{...tags...} 1.4
            # commcare_request_duration_count{...tags...} 1.0

        See https://prometheus.io/docs/concepts/metric_types/#histogram
A cumulative histogram with a base metric name of <name> exposes multiple time series
        during a scrape:
A cumulative histogram with a base metric name of <name > exposes multiple time series during a scrape :
def _histogram(self, name: str, value: float, bucket_tag: str, buckets: List[int], bucket_unit: str = '',
                  tags: Dict[str, str] = None, documentation: str = ''):
        """
        A cumulative histogram with a base metric name of <name> exposes multiple time series
        during a scrape:

        * cumulative counters for the observation buckets, exposed as
          `<name>_bucket{le="<upper inclusive bound>"}`
        * the total sum of all observed values, exposed as `<name>_sum`
        * the count of events that have been observed, exposed as `<name>_count`
          (identical to `<name>_bucket{le="+Inf"}` above)

        For example
        ::

            h = metrics_histogram(
                'commcare.request_duration', 1.4,
                bucket_tag='duration', buckets=[1,2,3], bucket_units='ms',
                tags=tags
            )

            # resulting metrics
            # commcare_request_duration_bucket{...tags..., le="1.0"} 0.0
            # commcare_request_duration_bucket{...tags..., le="2.0"} 1.0
            # commcare_request_duration_bucket{...tags..., le="3.0"} 1.0
            # commcare_request_duration_bucket{...tags..., le="+Inf"} 1.0
            # commcare_request_duration_sum{...tags...} 1.4
            # commcare_request_duration_count{...tags...} 1.0

        See https://prometheus.io/docs/concepts/metric_types/#histogram"""
        try:
            self._get_metric(PHistogram, name, tags, documentation, buckets=buckets).observe(value)
        except ValueError:
            pass
def _histogram ( self , name : str , value : float , bucket_tag : str , buckets : List [ int ] , bucket_unit : str = '' , tags : Dict [ str , str ] = None , documentation : str = '' ) : try : self . _get_metric ( PHistogram , name , tags , documentation , buckets = buckets ) . observe ( value ) except ValueError : pass