monitor

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 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

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

RpcMetrics ...

func MakeMonitorMetrics

func MakeMonitorMetrics(namespace string) *RpcMetrics

Jump to

Keyboard shortcuts

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