metrics

package
v0.0.0-...-05c9d29 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCServerInterceptor

func GRPCServerInterceptor() grpc.UnaryServerInterceptor

func HTTPMetricsMiddleware

func HTTPMetricsMiddleware() echo.MiddlewareFunc

func RecordHTTPRequest

func RecordHTTPRequest(method, path string, latency time.Duration, status int)

func RecordTPS

func RecordTPS(ctx context.Context, tpsValue float64)

func RecordTransaction

func RecordTransaction(ctx context.Context, latency time.Duration, success bool)

Usage examples

func UpdatePeerCount

func UpdatePeerCount(ctx context.Context, count int64)

Types

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(ctx context.Context, otlpEndpoint, serviceName string) (*Metrics, error)

func (*Metrics) PrometheusURL

func (m *Metrics) PrometheusURL() string

func (*Metrics) Shutdown

func (m *Metrics) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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