Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TranslateMetricsToPrometheusTextFormat ¶
func TranslateMetricsToPrometheusTextFormat(w *bytes.Buffer, ms []*metrics.MetricSnapshot, lisAddr, path string)
TranslateMetricsToPrometheusTextFormat translates Service Weaver metrics (keyed by weavelet id) to a text format that can be scraped by Prometheus [1].
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.
Click to show internal directories.
Click to hide internal directories.