Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(layers/prometheus-client): avoid multiple clone of labels #5028

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

koushiro
Copy link
Contributor

@koushiro koushiro commented Aug 21, 2024

Which issue does this PR close?

No

Rationale for this change

  • optimize metrics performance
  • unify the format of logic code to avoid unexpected errors

What changes are included in this PR?

  • avoid multiple clone of labels
  • remove duplicated record of errors_total in stat operation
  • rename PrometheusAccessor => PrometheusClientAccessor, PrometheusMetricWrapper => PrometheusClientMetricWrapper

Are there any user-facing changes?

IMO, semantically, this is a breaking change, because PrometheusAccessor and PrometheusMetricWrapper type are public types, but from a user perspective, this PR will not break existing code.

Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks a lot, really love this PR.

@Xuanwo Xuanwo merged commit ad58d08 into apache:main Aug 21, 2024
227 checks passed
@koushiro koushiro deleted the refactor-prometheus-client branch August 21, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants