Skip to content
New issue

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

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

Already on GitHub? # to your account

Accept a Registerer instead of a Registry in PrometheusMetricsBuilder #204

Merged
merged 1 commit into from
Oct 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/metrics/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
)

func NewPrometheusMetricsBuilder(prometheusRegistry *prometheus.Registry, namespace string, subsystem string) PrometheusMetricsBuilder {
func NewPrometheusMetricsBuilder(prometheusRegistry prometheus.Registerer, namespace string, subsystem string) PrometheusMetricsBuilder {
return PrometheusMetricsBuilder{
Namespace: namespace,
Subsystem: subsystem,
Expand All @@ -18,7 +18,7 @@ func NewPrometheusMetricsBuilder(prometheusRegistry *prometheus.Registry, namesp
// PrometheusMetricsBuilder provides methods to decorate publishers, subscribers and handlers.
type PrometheusMetricsBuilder struct {
// PrometheusRegistry may be filled with a pre-existing Prometheus registry, or left empty for the default registry.
PrometheusRegistry *prometheus.Registry
PrometheusRegistry prometheus.Registerer

Namespace string
Subsystem string
Expand Down