apache_beam.internal.metrics.metric module

Metrics API classes for internal use only.

Users should use apache_beam.metrics.metric package instead.

For internal use only. No backwards compatibility guarantees.

class apache_beam.internal.metrics.metric.Metrics[source]

Bases: object

static histogram(namespace, name, bucket_type, logger=None)[source]

Obtains or creates a Histogram metric.

Parameters:
  • namespace – A class or string that gives the namespace to a metric
  • name – A string that gives a unique name to a metric
  • bucket_type – A type of bucket used in a histogram. A subclass of apache_beam.utils.histogram.BucketType
  • logger – MetricLogger for logging locally aggregated metric
Returns:

A Histogram object.

class DelegatingHistogram(metric_name, bucket_type, logger)[source]

Bases: apache_beam.metrics.metricbase.Histogram

Metrics Histogram that Delegates functionality to MetricsEnvironment.

update(value)[source]