metric

package
v0.0.0-...-3af2098 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MLatencyMs records the time it took for matching operation
	MLatencyMs = stats.Float64("matching/latency", "Latency of matching operation", "ms")

	// KeyIsMatched holds matching operation result. It will be either "matched" or "mismatched"
	KeyIsMatched, _ = tag.NewKey("is_matched")

	// KeyMismatchedPath holds information of the mismatched path
	KeyMismatchedPath, _ = tag.NewKey("mismatched_path")
)

Functions

func AddIsMatchedTag

func AddIsMatchedTag(ctx context.Context, target string) (context.Context, error)

AddIsMatchedTag ...

func AddMismatchedTag

func AddMismatchedTag(ctx context.Context, reason string) (context.Context, error)

AddMismatchedTag ...

func InitializeLatencyTracking

func InitializeLatencyTracking(ctx context.Context) context.Context

InitializeLatencyTracking ...

func RecordMatched

func RecordMatched(ctx context.Context)

func RecordMismatched

func RecordMismatched(ctx context.Context, mismatchedPath string)

Types

type MetricServer

type MetricServer interface {
	Start() error
}

func NewMetricServer

func NewMetricServer(server MetricServerImpl) MetricServer

type MetricServerImpl

type MetricServerImpl struct {
	dig.In
	config.Config
}

func (*MetricServerImpl) Start

func (s *MetricServerImpl) Start() (err error)

Jump to

Keyboard shortcuts

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