DataDog / java-dogstatsd-client

Java statsd client library
MIT License
176 stars 101 forks source link

How to provide the timestamp for submitting distribution? #231

Open adamwrobel-ext-gd opened 11 months ago

adamwrobel-ext-gd commented 11 months ago

DataDog Web API for Distributions is like this: https://docs.datadoghq.com/api/latest/metrics/#submit-distribution-points

points  [array]

Points relating to the distribution point metric. All points must be tuples with timestamp and a list of values (cannot be a string). Timestamps should be in POSIX time in seconds.

However, recordDistributionValue has no place for a timestamp kind of value. How can I do this?

vickenty commented 11 months ago

Hi!

While it isn't possible to send distributions with a timestamp with statsd, you can do it using the Datadog API client library. You can find an example on the API page.