diff --git a/v2/metrics/metrics.go b/v2/metrics/metrics.go index 277f935..dce3a64 100644 --- a/v2/metrics/metrics.go +++ b/v2/metrics/metrics.go @@ -33,6 +33,10 @@ func New(cs ...prometheus.Collector) *Prometheus { } } +func (p *Prometheus) AppendCollectors(cs ...prometheus.Collector) { + p.cs = append(p.cs, cs...) +} + // NewPrometheus creates registers collectors and starts metrics server. func NewPrometheus(port int, cs ...prometheus.Collector) (*Prometheus, error) { p := New(cs...)