metrics

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ComponentRequestTotal = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "component_request_total",
			Help: "norm request total",
		},
		[]string{"module", "action", "status_code", "result_code", "version"},
	)
	ComponentRequestDuration = prometheus.NewSummaryVec(prometheus.SummaryOpts{
		Name:       "component_request_duration_millisecond",
		Help:       "norm request durations in millisecond",
		Objectives: map[float64]float64{0.25: 0.05, 0.5: 0.05, 0.75: 0.01, 0.9: 0.01, 0.99: 0.001},
	}, []string{"module", "action", "status_code", "result_code", "version"})
)

Functions

func ComponentRequestStatics

func ComponentRequestStatics(module string, action string, statusCode int, resultCode string, version string, startTime time.Time)

func ComponentWrongRequestStatics

func ComponentWrongRequestStatics(module string, action string, errMsg string, version string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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