-
Notifications
You must be signed in to change notification settings - Fork 485
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): provide builder APIs #5073
refactor(layers/prometheus-client): provide builder APIs #5073
Conversation
@Xuanwo maybe you can also take a look at this PR? |
core/src/layers/prometheus_client.rs
Outdated
|
||
fn register(&self, registry: &mut Registry) { | ||
registry.register_with_unit( | ||
"opendal_operation_duration", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can't use observe::METRIC_OPERATION_DURATION_SECONDS.name()
here, prometheus-client
will generate opendal_operation_duration_seconds_seconds
metric
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should use register
instead of register_with_unit
here, then we could use observe::METRIC_OPERATION_DURATION_SECONDS.name()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. Let's change it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot!
Which issue does this PR close?
Related issue: #5069 (comment)
Related PR: #5072
Rationale for this change
Provide similar APIs for
PrometheusLayer
andPrometheusClientLayer
What changes are included in this PR?
PrometheusLayer
PrometheusClientLayer::builder
PrometheusClientLayerBuilder
OperationErrorsTotalLabels
Are there any user-facing changes?
API breaking change