klio.metrics Subpackage

Subpackage for transform-level metrics.

klio.metrics.client

MetricsRegistry

Main client to create and emit metrics.

MetricsRegistry.counter

Get or create a counter.

MetricsRegistry.gauge

Get or create a gauge.

MetricsRegistry.timer

Get or create a timer.

MetricsRegistry.marshal

Create a dictionary-representation of a given metric.

MetricsRegistry.unmarshal

Create a metric instance based off of a dictionary.

klio.metrics.native

NativeMetricsClient

Metrics client for Beam-native metrics collection.

NativeMetricsClient.counter

Create a NativeCounter object.

NativeMetricsClient.gauge

Create a NativeGauge object.

NativeMetricsClient.timer

Create a NativeTimer object.

NativeCounter

Counter metric using Beam’s counter-type metric.

NativeGauge

Gauge metric using Beam’s gauge-type metric.

NativeTimer

Timer metric using Beam’s distribution-type metric.

klio.metrics.logger

MetricsLoggerClient

Logging client for transform metrics.

MetricsLoggerClient.logger

Python logger associated with the job which this client will use to emit metrics.

MetricsLoggerClient.unmarshal

Return a dict-representation of a given metric.

MetricsLoggerClient.emit

Log a given metric.

MetricsLoggerClient.counter

Create a LoggerCounter object.

MetricsLoggerClient.gauge

Create a LoggerGauge object.

MetricsLoggerClient.timer

Create a LoggerTimer object.

LoggerMetric

Base metric type for loggers.

LoggerCounter

Log-based counter metric.

LoggerGauge

Log-based gauge metric.

LoggerTimer

Log-based timer metric.

klio.metrics.shumway

ShumwayMetricsClient

Metrics client for FFWD metrics reporting via the shumway library.

ShumwayMetricsClient.unmarshal

Return a dict-representation of a given metric.

ShumwayMetricsClient.emit

Emit a metric to the FFWD agent.

ShumwayMetricsClient.counter

Create a ShumwayCounter object.

ShumwayMetricsClient.gauge

Create a ShumwayGauge object.

ShumwayMetricsClient.timer

Create a ShumwayTimer object.

BaseShumwayMetric

Base metric type for shumway.

ShumwayCounter

Shumway counter metric.

ShumwayGauge

Shumway gauge metric.

ShumwayTimer

Shumway timer metric.

klio.metrics.dispatcher

BaseMetricDispatcher

Base class for metric-specific dispatching.

BaseMetricDispatcher.logger

Python logger associated with metric dispatcher.

BaseMetricDispatcher.submit

Emit metrics via a threadpool.

CounterDispatcher.inc

Increment counter.

GaugeDispatcher.set

Set gauge to a given value.

TimerDispatcher.start

Start the timer.

TimerDispatcher.stop

Stop the timer.

klio.metrics.base

AbstractRelayClient

Abstract base class for all metric consumer relay clients.

AbstractRelayClient.unmarshal

Returns a dictionary-representation of the metric object

AbstractRelayClient.emit

Emit the given metric object to the particular consumer.

AbstractRelayClient.counter

Return a newly instantiated counter-type metric specific for the particular consumer.

AbstractRelayClient.gauge

Return a newly instantiated gauge-type metric specific for the particular consumer.

AbstractRelayClient.timer

Return a newly instantiated timer-type metric specific for the particular consumer.

BaseMetric

Base class for all metric types.

abstract_attr

Set an attribute or a property as abstract.