From fa0248c80c502c5c7af4c9918cef4c1b36e06394 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 27 Apr 2023 15:31:59 +0300 Subject: [PATCH] cleanup Signed-off-by: Vasiliy Tolstov --- broker/options.go | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/broker/options.go b/broker/options.go index 989f5fda..b5b8d933 100644 --- a/broker/options.go +++ b/broker/options.go @@ -12,34 +12,6 @@ import ( "go.unistack.org/micro/v4/tracer" ) -/* - -func (w *wrapper) Publish(ctx context.Context, p client.Message, opts ...client.PublishOption) error { - endpoint := p.Topic() - - labels := make([]string, 0, 4) - labels = append(labels, labelEndpoint, endpoint) - - w.opts.Meter.Counter(PublishMessageInflight, labels...).Inc() - ts := time.Now() - err := w.Client.Publish(ctx, p, opts...) - te := time.Since(ts) - w.opts.Meter.Counter(PublishMessageInflight, labels...).Dec() - - w.opts.Meter.Summary(PublishMessageLatencyMicroseconds, labels...).Update(te.Seconds()) - w.opts.Meter.Histogram(PublishMessageDurationSeconds, labels...).Update(te.Seconds()) - - if err == nil { - labels = append(labels, labelStatus, labelSuccess) - } else { - labels = append(labels, labelStatus, labelFailure) - } - w.opts.Meter.Counter(PublishMessageTotal, labels...).Inc() - - return err -} -*/ - var ( // PublishMessageDurationSeconds specifies meter metric name PublishMessageDurationSeconds = "publish_message_duration_seconds"