metrics

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ErrorStatusTypeValue sets status tag to "error"
	ErrorStatusTypeValue = "error"
	// SuccessStatusTypeValue sets status tag to "success"
	SuccessStatusTypeValue = "success"
	// EncryptOperationTypeValue sets operation tag to "encrypt"
	EncryptOperationTypeValue = "encrypt"
	// DecryptOperationTypeValue sets operation tag to "decrypt"
	DecryptOperationTypeValue = "decrypt"
	// GrpcOperationTypeValue sets operation tag to "grpc"
	GrpcOperationTypeValue = "grpc"
)

Variables

This section is empty.

Functions

func Serve

func Serve(metricsBackend, metricsAddress string) error

Serve starts new exporter if needed

Types

type StatsReporter

type StatsReporter interface {
	ReportRequest(ctx context.Context, operationType, status string, duration float64, errors ...string)
}

StatsReporter reports metrics

func NewStatsReporter

func NewStatsReporter() StatsReporter

NewStatsReporter instantiates otel reporter

Jump to

Keyboard shortcuts

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