-
Notifications
You must be signed in to change notification settings - Fork 243
Open
Description
We are using statsd-exporter in our integrations. Is there any way of sending histogram data to grafana from python code?
We are using statsd library in python.
We use statsd-exporter and victoria metrics data store to configure out metrics.
I added the mapping section as mentioned here to our integrations.yaml file.
In python code, I extended the statsd lib to send histograms. "h" here is sending only metric_sum and metric_count similar to timers. I was expecting buckets to be sent for metric name as defined in the mapping. Can someone help me out here.
My end goal is to use histogram_quantile() in grafana, i think this expects buckets to be preprocessed.
from statsd import StatsClient
class CustomStatsClient(StatsClient):
def histogram(self, stat: str, value: float):
histogram_message = f"{self.prefix}.{stat}:{value}|h"
self._send(histogram_message)
def _send(self, message: str):
self._sock.sendto(message.encode(), (self.host, self.port))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels