Skip to content

Delete unused custom json-iterator marshaling - #2121

Merged
bwplotka merged 1 commit into
prometheus:mainfrom
liggitt:delete-jsoniter-marshaling
Sep 18, 2026
Merged

bwplotka merged 1 commit into
prometheus:mainfrom
liggitt:delete-jsoniter-marshaling

Conversation

@liggitt

@liggitt liggitt commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

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

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
liggitt force-pushed the delete-jsoniter-marshaling branch from a77d240 to 1ababcf Compare September 17, 2026 20:10

@bwplotka bwplotka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@bwplotka
bwplotka merged commit 1f2807b into prometheus:main Sep 18, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants