Skip to content

DogstatsdExporter: max_payload_len behavior difference #560

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

Open
nappairam opened this issue Feb 26, 2025 · 2 comments
Open

DogstatsdExporter: max_payload_len behavior difference #560

nappairam opened this issue Feb 26, 2025 · 2 comments
Labels
C-exporter Component: exporters such as Prometheus, TCP, etc. E-simple Effort: simple. T-request Type: request.

Comments

@nappairam
Copy link
Contributor

Thanks for taking time to review my PR for global labels, namespace.
#555

I observed another difference today, when compared to the v0.8 of dogstatsd exporter.
Each metric is send in a separate UDP packets, instead of aggregating.

Version 0.8 supported a parameter max_packet_size. The exporter will aggregate the metrics and split based on the above size and send as UDP packets.
https://github.com/dialtone/metrics-exporter-dogstatsd/blob/a623e5c1463f063c1377386b2754f1e79cc5435a/src/builder.rs#L466

Current version 0.9 has a similar parameter maximum_payload_length

pub fn with_maximum_payload_length(

But instead of aggregating the metrics in a single packet, it simply restricts the maximum size of the single metric.

Aggregating metrics is very useful to servers with large amount of metrics, since exporter do not need to spam UDP packets and waste CPU cycles.

Could you consider adding this aggregation support ?

@nappairam nappairam changed the title Dogstatds exporter: max_payload_len behavior difference DogstatsdExporter: max_payload_len behavior difference Feb 26, 2025
@tobz
Copy link
Member

tobz commented Feb 27, 2025

Payload-level aggregation is definitely on the roadmap... just haven't gotten to it yet.

I'll keep this issue open to track it. 👍🏻

@tobz tobz added C-exporter Component: exporters such as Prometheus, TCP, etc. E-simple Effort: simple. T-request Type: request. labels Feb 27, 2025
@nappairam
Copy link
Contributor Author

Attempting this on #561

kp-mariappan-ramasamy added a commit to expressvpn/lightway that referenced this issue May 13, 2025
Upstream dogstatsd exporter has been moved to metrics org recently and with the
move, code has been refactored with some features dropped like consolidating metrics
in single UDP packet etc.
Ref: metrics-rs/metrics#560

Until it is fixed, ignore the outdated error for metrics-util crate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-exporter Component: exporters such as Prometheus, TCP, etc. E-simple Effort: simple. T-request Type: request.
Projects
None yet
Development

No branches or pull requests

2 participants