metrics

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

func Count

func Count(name string, value int64, tags ...Tag)

func FCount

func FCount(name string, value float64, tags ...Tag)

func FGuage

func FGuage(name string, value float64, tags ...Tag)

func Guage

func Guage(name string, value int64, tags ...Tag)

func Incr

func Incr(name string, tags ...Tag)

func LoggerErrorAndMetrics

func LoggerErrorAndMetrics(ctx context.Context, metric, format string, args ...interface{})

语法糖, 输入日志并且打点

func Timing

func Timing(name string, value time.Duration, tags ...Tag)

func TimingSince

func TimingSince(name string, now time.Time, tags ...Tag)

TimingSince 耗时计算语法糖, defer TimingSince 直接计算耗时.

Types

type Tag

type Tag = statsd.Tag

Jump to

Keyboard shortcuts

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