DataDog / java-dogstatsd-client

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

feat: Add an API to send multiple samples at once #235

Closed blemale closed 9 months ago

blemale commented 10 months ago

recordDistributionValues is similar to recordDistributionValue but it lets the client sends multiple samples in one message using dogstatsd 1.1 protocol.

Because this is a shift compared to how other methods are behaving, these methods are provided only in DirectStatsDClient which provides direct access to some low level dogstatsd protocol features.

This is recommended in high performance cases were the overhead of the statsd library might be significant and the sampling is already done by the client.

Port of https://github.com/DataDog/datadog-go/pull/296.

blemale commented 9 months ago

@vickenty does the PR looks good to you now and can be merged? The 2 red job in the CI seem to be unrelated with this PR:

Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 32.133 sec <<< FAILURE! - in com.timgroup.statsd.NonBlockingStatsDClientPerfTest
perfTest(com.timgroup.statsd.NonBlockingStatsDClientPerfTest)  Time elapsed: 30.007 sec  <<< ERROR!
org.junit.runners.model.TestTimedOutException: test timed out after 30000 milliseconds
        at com.timgroup.statsd.NonBlockingStatsDClientPerfTest.perfTest(NonBlockingStatsDClientPerfTest.java:86)
Chocolatey v2.2.2
Installing the following packages:
maven
By installing, you accept licenses for the packages.
Progress: Downloading maven 3.9.6... 100%

maven v3.9.6 [Approved]
maven package files install completed. Performing other installation steps.
The package maven wants to run 'chocolateyinstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): 
Timeout or your choice of '' is not a valid selection.
You must select an answer
maven not installed. An error occurred during installation:
 Too many bad attempts. Stopping before application crash.

Chocolatey installed 0/0 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
The process cannot access the file 'C:\ProgramData\chocolatey\lib\maven\.chocolateyPending' because it is being used by another process.