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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

support disabling statsd metric key sanitizing #20595

Open
to-m opened this issue Jun 2, 2024 · 3 comments
Open

support disabling statsd metric key sanitizing #20595

to-m opened this issue Jun 2, 2024 · 3 comments
Labels
source: statsd Anything `statsd` source related type: feature A value-adding code addition that introduce new functionality.

Comments

@to-m
Copy link

to-m commented Jun 2, 2024

A note for the community

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

Looking into replacing fluentbit with vector.

Fluentbit statsd input leaves metric names as is.
Vector replaces "/" with "-", whitespaces with "_" and deletes all non alphanumeric characters.

parsing the values after these replacements are made is impossible.

Attempted Solutions

Could not find workaround for this.

Proposal

add configuration option for 'statsd' source to not sanitize metric name.
let user use transforms to modify it later, if needed

References

No response

Version

vector 0.38.0

@to-m to-m added the type: feature A value-adding code addition that introduce new functionality. label Jun 2, 2024
@jszwedko jszwedko added the source: statsd Anything `statsd` source related label Jun 3, 2024
@jszwedko
Copy link
Member

jszwedko commented Jun 3, 2024

Thanks for filing this @to-m . I agree. StatsD doesn't seem to have a strong opinion on valid metric names. I might even argue the statsd source shouldn't be sanitizing at all and that users should do that in a follow-up remap transform if desired.

@to-m
Copy link
Author

to-m commented Jun 3, 2024

Hi @jszwedko - I whole heartedly agree, but since existing users may have come to rely on the existing behavior I didn't think to suggest to replace it.
Also - a quick question - do you have any information at all with regards to cost of doing the sanitization in the statsd source vs. in remap? If using remap is more expensive - it would be better to leave it as an option in the statsd source behavior.

@jszwedko
Copy link
Member

jszwedko commented Jun 3, 2024

Agreed, given this would be a breaking change, a configuration field to opt out makes sense to me.

Using remap is likely to be more expensive compared with native Rust code, but I don't think it'd be prohibitively so. remap is designed to be performant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: statsd Anything `statsd` source related type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants