add utf8 validation checks to incoming metrics#1831
Conversation
|
I would still like to add some more unit tests, but I feel pretty confident with this approach |
|
We are going to change this behavior and instead of using two flags, just use one. I will refactor this to add the discussed changes. |
input/input.go
Outdated
| invalidUtfMD: stats.NewCounterRate32(fmt.Sprintf("input.%s.metricdata.discarded.invalid_utf", input)), | ||
| // metric input.%s.metricdata.discarded.invalid_input is a count of times a metricdata was considered invalid due to | ||
| // invalid input data in the metric definition. all rejected metrics counted here are also counted in the above "invalid" counter | ||
| invalidInputMD: stats.NewCounterRate32(fmt.Sprintf("input.%s.metricdata.discarded.invalid_tag", input)), |
There was a problem hiding this comment.
| invalidInputMD: stats.NewCounterRate32(fmt.Sprintf("input.%s.metricdata.discarded.invalid_tag", input)), | |
| invalidInputMD: stats.NewCounterRate32(fmt.Sprintf("input.%s.metricdata.discarded.invalid_input", input)), |
There was a problem hiding this comment.
I think I may have fixed this while you were reviewing it.
|
Looks good with one comment. |
Yes, I was planning on doing that in a separate PR after I have a new version number to use. |
update changelog to include breaking change from #1831
We decided to consolidate both UTF8 and Invalid Tag validation into one. It is now called InvalidInput. This will break a few things, including deployments that use
reject-invalid-tags. That option no longer exists, now it is just calledreject-invalid-input, with a default oftrue.For dashboards, the old metric
...metricdata.discarded.invalid_tagno longer exists. It is now called...metricdata.discarded.invalid_input. Dashboards will need to be updated.Closes: #1728