monitor

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagEnableMonitor = "rpc.enable-monitor"
	MetricsNamespace  = "x"
	// MetricsSubsystem is a subsystem shared by all metrics exposed by this package.
	MetricsSubsystem = "rpc"

	MetricsFieldName   = "apis"
	MetricsMethodLabel = "method"

	MetricsCounterNamePattern   = "%s_%s_count"
	MetricsHistogramNamePattern = "%s_%s_duration"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

func GetMonitor

func GetMonitor(method string, logger log.Logger, metrics *RpcMetrics) *Monitor

func (*Monitor) OnBegin

func (m *Monitor) OnBegin() *Monitor

func (*Monitor) OnEnd

func (m *Monitor) OnEnd(args ...interface{})

type RpcMetrics added in v0.18.10

type RpcMetrics struct {
	Counter   metrics.Counter
	Histogram metrics.Histogram
}

RpcMetrics ...

func MakeMonitorMetrics added in v1.6.7

func MakeMonitorMetrics(namespace string) *RpcMetrics

Jump to

Keyboard shortcuts

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