prometheus

package
v3.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2022 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncCounter

func IncCounter(summaryName string)

func IncCounterWithLabel

func IncCounterWithLabel(counterName string, label prometheus.Labels)

func IncSummary

func IncSummary(summaryName string, val float64)

func IncSummaryWithLabel

func IncSummaryWithLabel(counterName string, val float64, label prometheus.Labels)

func SetGauge

func SetGauge(gaugeName string, val float64)

func SetGaugeWithLabel

func SetGaugeWithLabel(gaugeName string, val float64, label prometheus.Labels)

Types

type PrometheusReporter

type PrometheusReporter struct {
	// contains filtered or unexported fields
}

PrometheusReporter will collect the data for Prometheus if you want to use this feature, you need to initialize your prometheus. https://prometheus.io/docs/guides/go-application/

func (*PrometheusReporter) Report

func (reporter *PrometheusReporter) Report(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation, cost time.Duration, res protocol.Result)

Report reports the duration to Prometheus the role in url must be consumer or provider or it will be ignored

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL