metrics

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppMetrics

type AppMetrics struct {
	metric.Meter

	ActivePeers            metric.Int64UpDownCounter
	PeerConnectionDuration metric.Int64Histogram

	Registrations        metric.Int64Counter
	Deregistrations      metric.Int64Counter
	RegistrationFailures metric.Int64Counter
	RegistrationDelay    metric.Float64Histogram
	GetRegistrationDelay metric.Float64Histogram

	MessagesForwarded      metric.Int64Counter
	MessageForwardFailures metric.Int64Counter
	MessageForwardLatency  metric.Float64Histogram
}

AppMetrics holds all the application metrics

func NewAppMetrics

func NewAppMetrics(meter metric.Meter) (*AppMetrics, error)

type Metrics

type Metrics struct {
	Meter api.Meter

	Endpoint string

	*http.Server
	// contains filtered or unexported fields
}

Metrics holds the metrics information and exposes it

func NewServer

func NewServer(port int, endpoint string) (*Metrics, error)

NewServer initializes and returns a new Metrics instance

func (*Metrics) Shutdown

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

Shutdown stops the metrics server

Jump to

Keyboard shortcuts

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