metrics

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrCount

func ErrCount(tag string)

ErrCount may be invoked in any method which error has happened.

Types

type ReporterParam

type ReporterParam struct {
	// Request url whick config in proto file.
	Url string
	// Request success value is "0". if Error occurred,
	// Value is errcode.
	Code string
	// Request start time for calculating latency.
	StartTime   time.Time
	ServiceName string
	// Http method like PUT/POST/DELETE and so on..
	HttpMethod string
	// Request client.
	Client string
}

ReporterParam contains prometheus label value and other extra attribute.

func (*ReporterParam) RequestComplete

func (reporter *ReporterParam) RequestComplete() float64

RequestComplete may be invoked in any method which request is ended.

Jump to

Keyboard shortcuts

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