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)

class MyServant(MyIceModule.MyServant):

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

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

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 apply standard python logging configuration before decorator usage.

Disable or enable

Example with env

import os

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


Project details

Download files

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

Files for ice_latency_metrics_collector, version 0.1.0a9
Filename, size File type Python version Upload date Hashes
Filename, size ice-latency-metrics-collector-0.1.0a9.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page