WIP sanitize structured metadata during ingestion in the distributor #15141
+105
−13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Still working here, want to see if I can get the benchmark results to be any better.
The benchmark itself needs some love as well, if you use it with
-count
you can get a segmentation fault/nil pointer dereference panic in the mock ingester code.Just the addition of the two checks slows down
distributor.Push
significantly, and also it looks to me like when the log line doesn't contain a log field for otlp somehow we might be adding theunknown
value multiple times?[{detected_level unknown} {detected_level unknown} {detected_level unknown} {detected_level unknown}]
Very basic benchmark results so far:
f65ab130725dc25c9d546fa4d5fb1e4a6d26009e
makeWriteRequestWithLabels
to add structured metadatadistributor.Push
to check and sanitize the label valueNote that this is worst case scenario, since every entry in the write request has structured metadata that needs to be checked