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
File details
Details for the file sb-opentelemetry-sdk-extension-statsd-0.8.2.tar.gz
.
File metadata
- Download URL: sb-opentelemetry-sdk-extension-statsd-0.8.2.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fffbbb127f25f56f171a62f68273204a1be44f1c293598845b0c2eb4c7a04cdd |
|
MD5 | 2e0a71020600093fa721fc761e9a30df |
|
BLAKE2b-256 | a6c4e5664ba31d706e6e08aa4c93a9d55a27e12f8e6fd793fb7e6482a88fed26 |
File details
Details for the file sb_opentelemetry_sdk_extension_statsd-0.8.2-py3-none-any.whl
.
File metadata
- Download URL: sb_opentelemetry_sdk_extension_statsd-0.8.2-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79a2aefc395f6f48f197be9d27109c893ee205ff271fa2a389c4e9049f4f25b4 |
|
MD5 | 1064b1a7ddc429f19f7eef9793cafd56 |
|
BLAKE2b-256 | 52310fd1f571c910bc356ea1d5953b3628b0a70d04c51fb360fd7ad2e3622b26 |