metrics

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppStatuszInfo

type AppStatuszInfo struct {
	App        string
	Deployment string
	Age        string
	TraceFile  string
	Listeners  map[string][]string
	Config     map[string]string
	Components []ComponentStatuszInfo
}

AppStatuszInfo contains per app information to be displayed on the /statusz page.

type ComponentStatuszInfo

type ComponentStatuszInfo struct {
	Name        string              // Name of the component
	Replication int                 // Number of replicas
	Stats       []methodStatuszInfo // Per method status
}

ComponentStatuszInfo contains per component information to be displayed on the /statusz page.

type StatsProcessor

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

StatsProcessor keeps track of various statistics for a given app deployment.

func NewStatsProcessor

func NewStatsProcessor() *StatsProcessor

func (*StatsProcessor) CollectMetrics

func (s *StatsProcessor) CollectMetrics(ctx context.Context, snapshotFn func() []*metrics.MetricSnapshot) error

CollectMetrics enables the stats processor to update the tracked stats based on a new set of metrics provided by snapshotFn.

func (*StatsProcessor) GetStatsStatusz

func (s *StatsProcessor) GetStatsStatusz() map[string][]methodStatuszInfo

GetStatsStatusz returns the latest stats that should be rendered on the /statusz page.

Jump to

Keyboard shortcuts

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