Skip to main content

ZerocIce latency metrics collector

Project description

Simple Example

from ice_latency_metrics_collector import latency_metrics_factory

import MyIceModule


with_latency_metrics = latency_metrics_factory(enabled=True)


@with_latency_metrics
class MyServant(MyIceModule.MyServant):

  # This method send timings to statsd
  def my_proxyed_method(self):
    # your implementation
    pass

  # This method don't send timings to statsd
  def my_custom_internal_method(self):
    # your implementation
    pass

Statsd configuration

config param in factory will be passed to StatsClient constructor

latency_metrics_factory(enabled=True, config=dict(host='statsd'))

Logging configuration

You need to use standard python logging configuration file.

latency_metrics_factory(enabled=True, logging_conf_path=your_logging_conf_path)

Disable or enable

Example with env

import os

METRICS_ENABLED = os.environ.get('METRICS_ENABLED', 'false').lower() == 'true'

latency_metrics_factory(enabled=METRICS_ENABLED)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

File details

Details for the file ice-latency-metrics-collector-0.1.0a6.tar.gz.

File metadata

File hashes

Hashes for ice-latency-metrics-collector-0.1.0a6.tar.gz
Algorithm Hash digest
SHA256 359e9a5d6afc61cc5f4e93eb033eb18d9e9055e6c45e8e2186a51a9db9c0e0fd
MD5 1f48088c407c7b8a2001f2e63afd938a
BLAKE2b-256 d889803380e1b4fc1c6c30c1333f1edd8816956133adaf64a75221b474bcde3b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page