Delete unused custom json-iterator marshaling - #2121
Merged
Merged
Conversation
These methods are not used by client_golang (it only unmarshals), and did not match stdlib encoding of common/model types Signed-off-by: Jordan Liggitt <liggitt@google.com>
liggitt
force-pushed
the
delete-jsoniter-marshaling
branch
from
September 17, 2026 20:10
a77d240 to
1ababcf
Compare
bwplotka
approved these changes
Sep 18, 2026
bwplotka
left a comment
Member
There was a problem hiding this comment.
I think this is OK. We did some investigation and those are not used in Prometheus, so I am not sure why we optimized marshalling for those.
The bucket omit empty logic and 0.xxx decimals is the only difference for those who depended on those. It shouldn't be functional.
Perhaps @krajorama has more input on this, but he is PTO. The risk is low and we can bring it back if needed in some form, so LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
These methods are not used by client_golang (it only unmarshals), and did not match stdlib encoding of common/model types.
Dropping these and and the json-iterator marshal benchmarks as part of #2105
If json/v2 streaming marshaling improvements are added in a follow-up, that should be done in the common/model repo/package, with benchmarks in that repo, and should be byte-identical to the stdlib json encoders.
The benchmark change is best reviewed ignoring whitespace: https://github.com/prometheus/client_golang/pull/2121/changes?w=1
cc @bwplotka