1.15.4.dev2+g3e3ce2426

flytekit.interfaces.stats.client

Directory

Classes

Class Description
DummyStatsClient A dummy client for statsd.
ScopeableStatsProxy A Proxy object for an underlying statsd client.
StatsClientProxy A Proxy object for an underlying statsd client.
StatsConfig Configuration for sending statsd.

flytekit.interfaces.stats.client.DummyStatsClient

A dummy client for statsd.

def DummyStatsClient(
    host,
    port,
    prefix,
    maxudpsize,
    ipv6,
):

Create a new client.

Parameter Type
host
port
prefix
maxudpsize
ipv6

Methods

Method Description
close() Used to close and clean up any underlying resources
decr() Decrement a stat by count
gauge() Set a gauge value
incr() Increment a stat by count
pipeline() None
set() Set a set value
timer() None
timing() Send new timing information

close()

def close()

Used to close and clean up any underlying resources.

decr()

def decr(
    stat,
    count,
    rate,
):

Decrement a stat by count.

Parameter Type
stat
count
rate

gauge()

def gauge(
    stat,
    value,
    rate,
    delta,
):

Set a gauge value.

Parameter Type
stat
value
rate
delta

incr()

def incr(
    stat,
    count,
    rate,
):

Increment a stat by count.

Parameter Type
stat
count
rate

pipeline()

def pipeline()

set()

def set(
    stat,
    value,
    rate,
):

Set a set value.

Parameter Type
stat
value
rate

timer()

def timer(
    stat,
    rate,
):
Parameter Type
stat
rate

timing()

def timing(
    stat,
    delta,
    rate,
):

Send new timing information.

delta can be either a number of milliseconds or a timedelta.

Parameter Type
stat
delta
rate

flytekit.interfaces.stats.client.ScopeableStatsProxy

A Proxy object for an underlying statsd client. Adds a new call, scope(prefix), which returns a new proxy to the same client which will prefix all calls to underlying methods with the scoped prefix: new_client = client.get_stats(‘a’) new_client.incr(‘b’) # Metric name = a.b This can be nested: newer_client = new_client.get_stats(‘subsystem’) newer_client.incr(‘bad’) # Metric name = a.subsystem.bad

def ScopeableStatsProxy(
    client,
    prefix,
):
Parameter Type
client
prefix

Methods

Method Description
get_stats() None
pipeline() None

get_stats()

def get_stats(
    name,
):
Parameter Type
name

pipeline()

def pipeline()

flytekit.interfaces.stats.client.StatsClientProxy

A Proxy object for an underlying statsd client. Adds a new call, scope(prefix), which returns a new proxy to the same client which will prefix all calls to underlying methods with the scoped prefix: new_client = client.get_stats(‘a’) new_client.incr(‘b’) # Metric name = a.b This can be nested: newer_client = new_client.get_stats(‘subsystem’) newer_client.incr(‘bad’) # Metric name = a.subsystem.bad

def StatsClientProxy(
    client,
    prefix,
):
Parameter Type
client
prefix

Methods

Method Description
get_stats() None
pipeline() None

get_stats()

def get_stats(
    name,
):
Parameter Type
name

pipeline()

def pipeline()

flytekit.interfaces.stats.client.StatsConfig

Configuration for sending statsd.

def StatsConfig(
    host: str,
    port: int,
    disabled: bool,
    disabled_tags: bool,
):
Parameter Type
host str
port int
disabled bool
disabled_tags bool

Methods

Method Description
auto() Reads from environment variable, followed by ConfigFile provided

auto()

def auto(
    config_file: typing.Union[str, ConfigFile],
):

Reads from environment variable, followed by ConfigFile provided

Parameter Type
config_file typing.Union[str, ConfigFile]