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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for ice_latency_metrics_collector-0.1.0a4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 869d8d864b7fed7a9dc5e593fc388149e584f8c16d4c667d771e1bc7dea9bb92 |
|
MD5 | f57a8ddfaad7ab6b92e732c22eabc90a |
|
BLAKE2b-256 | a76770b5e80799590060ee6a0b051b171179ed475f0ed14f73a01c8251718c63 |