StatsD client support for OpenTelemetry
Project description
This library provides components necessary to send OpenTelemetry metrics to a StatsD backend.
Installation
pip install sb-opentelemetry-sdk-extension-statsd
Usage
Install the OpenTelemetry SDK package.
pip install opentelemetry-sdk
Next, use the provided StatsdMeterProvider instead of the default MeterProvider.
from statsd import StatsdClient
from opentelemetry import metrics
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.extension.statsd.metrics import StatsdMeterProvider
statsd = StatsdClient(max_buffer_size=0)
provider = StatsdMeterProvider(statsd=statsd, resource=Resource(attributes={
"service.name": "service-Name",
}))
metrics.set_meter_provider(provider)
References
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
Built Distribution
Close
Hashes for sb-opentelemetry-sdk-extension-statsd-0.8.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fffbbb127f25f56f171a62f68273204a1be44f1c293598845b0c2eb4c7a04cdd |
|
MD5 | 2e0a71020600093fa721fc761e9a30df |
|
BLAKE2b-256 | a6c4e5664ba31d706e6e08aa4c93a9d55a27e12f8e6fd793fb7e6482a88fed26 |
Close
Hashes for sb_opentelemetry_sdk_extension_statsd-0.8.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79a2aefc395f6f48f197be9d27109c893ee205ff271fa2a389c4e9049f4f25b4 |
|
MD5 | 1064b1a7ddc429f19f7eef9793cafd56 |
|
BLAKE2b-256 | 52310fd1f571c910bc356ea1d5953b3628b0a70d04c51fb360fd7ad2e3622b26 |