[RenderTextFormat] Allow value errors to be rendered as comments #142
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.
This PR addresses a specific scenario encountered with Redis and RedisNg storage, where samples with mismatching labels can be stored. For instance:
In the above example, the counter metadata specifies
label1
andlabel2
but it's possible to store samples with more or fewer labels, e.g.["bob","alice","eve"]
. This could happen under different circumstances. For example, a new version of the code introduceslabel3
for the counter.Depending on the setup, flushing the storage after the new code is out could be a valid way to avoid the problem. However, it becomes complex in environments with canary deployment where multiple versions of the code are required to run together.
While there are ways to avoid the scenario, offering users the option to ignore errors for a limited number of metrics can be beneficial. It avoids the complete failure of the rendering operation in cases of minor inconsistencies. This PR does that.
Thanks for reviewing this! 🙏