From 37d937d7ae947a1ecdead531f771e834a582e365 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sat, 9 Oct 2021 19:16:45 +0300 Subject: [PATCH] meter: add missing options Signed-off-by: Vasiliy Tolstov --- meter/options.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/meter/options.go b/meter/options.go index 73cfa92a..3fa863db 100644 --- a/meter/options.go +++ b/meter/options.go @@ -51,6 +51,20 @@ func NewOptions(opt ...Option) Options { return opts } +// LabelPrefix sets the labels prefix +func LabelPrefix(pref string) Option { + return func(o *Options) { + o.LabelPrefix = pref + } +} + +// MetricPrefix sets the metric prefix +func MetricPrefix(pref string) Option { + return func(o *Options) { + o.MetricPrefix = pref + } +} + // Context sets the metrics context func Context(ctx context.Context) Option { return func(o *Options) {