perf and bugfix (dogstatsd): replace regex parser with position-flexible implementation#52
Conversation
0e8ad02 to
687ca8c
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
duncanpharvey
left a comment
There was a problem hiding this comment.
Looks good! I tested this in Azure Functions and confirmed it works with the Java, .NET, Python, and Node.js DogStatsD clients.
It looks like Saluki already has some dogstatsd metric parsing logic so I wonder if this is something we could use in our dogstatsd crate instead of rewriting it.
After testing Saluki’s parsing, I think adopting it now is riskier for two reasons: Given that, I’d prefer to keep the current implementation and revisit the idea once we’ve fully migrated to crate-based dependencies. |
…ible implementation
883d3f6 to
4ed8aef
Compare
Sounds good! Thanks for exploring this option |
https://datadoghq.atlassian.net/browse/SVLS-8122
What does this PR do?
Replace regex-based DogStatsD metric parsing with a loop-based approach that accepts optional fields (tags, timestamp, sample_rate, container_id) in any order, matching the Datadog Agent's behavior.
Motivation
The previous implementation assumed a fixed ordering in serialized metric data, leading to valid payloads being rejected. This update corrects that behavior and improves overall performance.
Additional Notes
Changes:
Describe how to test/QA your changes