Closed Jason8Ni closed 2 years ago
Thanks for the PR! I'll try to take a first pass soon.
This is mainly useful for
HISTOGRAM
,DISTRIBUTION
, andTIMING
but I've added the functionality for all types except forSET
. I can scope it to justHISTOGRAM
,DISTRIBUTION
, andTIMING
if that's preferred instead.
I was just thinking this through, I'm not sure I understand why it would be useful for counters or gauges since callers can just aggregate those themselves. I would prefer if you just limited this to histograms, distributions, and timing. Thanks!
I've taken the suggested approach of adding Packed
variants to the MetricValue
enum. I've also added some tests for these as well as simple examples in lib.rs
, the README
and under examples/
! Let me know if i've missed anything and thanks for the review!
Also, I've run clippy
and fmt
and fixed all the issues.
Your changes look great! Left a few last minor comments. I'll try to resurrect the benchmarking code to make sure single-value performance is roughly the same a bit later.
The benchmarks are pretty noisy (as they usually are) but single value performance looks to be within ~5% of what it is in master. Going to squash the commits down and merge. Thanks again for your work!
The benchmarks are pretty noisy (as they usually are) but single value performance looks to be within ~5% of what it is in master. Going to squash the commits down and merge. Thanks again for your work!
Thanks for reviewing! When you get a chance, would you be able to create a new release containing these changes?
The benchmarks are pretty noisy (as they usually are) but single value performance looks to be within ~5% of what it is in master. Going to squash the commits down and merge. Thanks again for your work!
Thanks for reviewing! When you get a chance, would you be able to create a new release containing these changes?
Sure, I'll try to put something out later this week.
This PR adds support for value packing in the Datadog Datagram which is available for Datadog agent versions
>=v6.25.0 && <v7.0.0
or>=v7.25.0
. All metric types except set support this, since:
could be in the value of a set. This allows clients to buffer histogram and distribution values and send them in fewer payload to the agent.Example:
<METRIC_NAME>:<VALUE1>:<VALUE2>:<VALUE3>|<TYPE>|@<SAMPLE_RATE>|#<TAG_KEY_1>:<TAG_VALUE_1>,<TAG_2>
This is mainly useful for
HISTOGRAM
,DISTRIBUTION
, andTIMING
but I've added the functionality for all types except forSET
. I can scope it to justHISTOGRAM
,DISTRIBUTION
, andTIMING
if that's preferred instead.