metrics

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 14 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 InitMetricsExporter

func InitMetricsExporter(metricsBackend, metricsAddress string) error

InitMetricsExporter initializes new exporter.

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, error)

NewStatsReporter instantiates otel reporter.

Jump to

Keyboard shortcuts

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