Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an API to send multiple samples at once #296

Merged
merged 4 commits into from
Dec 15, 2023

Conversation

iksaif
Copy link
Contributor

@iksaif iksaif commented Dec 14, 2023

DistributionSamples is similar to Distribution, but it lets the client deals with the sampling, rate is passed to the agent and not used for further sampling. WithMaxBufferedMetricsPerContext is ignored when using this method.

Because this is a shift compared to how other methods are behaving, this method is provided only in ClientDirect which provides direct access to some low level dogstatsd protocol features like DataDog/datadog-go#extended-aggregation

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.

NewDirect and NewDirectWithWriter can be used to instantiate a new direct client, mocks and noop clients are available.

replaces #292

@iksaif iksaif requested a review from a team as a code owner December 14, 2023 12:39
statsd/statsd.go Outdated Show resolved Hide resolved
vickenty
vickenty previously approved these changes Dec 14, 2023
Co-authored-by: Olivier Vielpeau <olivielpeau@users.noreply.github.com>
@iksaif iksaif merged commit 112920c into master Dec 15, 2023
34 checks passed
@iksaif iksaif deleted the corentin.chary/send-multiple-samples branch December 15, 2023 08:29
blemale added a commit to blemale/java-dogstatsd-client that referenced this pull request Jan 26, 2024
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 DataDog/datadog-go#296.
blemale added a commit to blemale/java-dogstatsd-client that referenced this pull request Jan 26, 2024
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 DataDog/datadog-go#296.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants