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

[receiver/statsdreceiver] Add support for parsing dogstatsd multi value lines #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

robskillington
Copy link
Member

@robskillington robskillington commented Dec 9, 2024

Description

dogstatsd v1.1 protocol allows specifying multiple values in a single datagram. This adds support for multiple values, converting them into multiple metrics with a single value each.

Testing

Added unit tests coverage for parsing multiple values

Documentation

None added

Copy link

maybelle commented Dec 9, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@maybelle maybelle changed the title [statsdreceiver] Add support for parsing dogstatsd multi value lines [receiver/statsdreceiver] Add support for parsing dogstatsd multi value lines Dec 9, 2024
Copy link

@vdarulis vdarulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm overall if we want to just unblock stuff, it doesn't seem that the existing code is careful to avoid allocs anyway

return res, nil
}

func (i *statsDMetricIter) ForEachValue(f func(m statsDMetric)) error {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Maybe add a reason why both All and ForEachValue exist? (call out that foreachvalue avoids heap allocs?)

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.

3 participants