Documentation ¶
Index ¶
- func GenerateMetrics(metricsCollections Collections) []*proto.StatsEntity
- func GenerateMetricsReportBundle(entities []*StatsEntityWrapper) core.Payload
- func GetCalculationMap() map[string]string
- func GetTimeMetrics(times []float64, metricType string) float64
- func NewStatsEntity(dims []*proto.Dimension, samples []*proto.SimpleMetric) *proto.StatsEntity
- type Collections
- type Collector
- type CommonDim
- type MetricsHandler
- type MetricsReportBundle
- type NginxCollectorConfig
- type NginxSource
- type PerDimension
- type Source
- type StatsEntityWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMetrics ¶ added in v2.25.0
func GenerateMetrics(metricsCollections Collections) []*proto.StatsEntity
func GenerateMetricsReportBundle ¶ added in v2.25.0
func GenerateMetricsReportBundle(entities []*StatsEntityWrapper) core.Payload
func GetCalculationMap ¶ added in v2.20.0
func GetTimeMetrics ¶ added in v2.24.0
func NewStatsEntity ¶
func NewStatsEntity(dims []*proto.Dimension, samples []*proto.SimpleMetric) *proto.StatsEntity
Types ¶
type Collections ¶
type Collections struct { Count int // this is the number of collections run. Will use this to calculate the average. Data map[string]PerDimension }
func SaveCollections ¶
func SaveCollections(metricsCollections Collections, reports ...*proto.MetricsReport) Collections
SaveCollections loops through one or more reports and get all the raw metrics for the Collections Note this function operate on the Collections struct data directly.
type CommonDim ¶
type CommonDim struct {
SystemId, Hostname, InstanceTags, InstanceGroup,
DisplayName, NginxId string
PublishedAPI, NginxType, NginxBuild, NginxVersion,
NginxBinPath, NginxConfPath string
NginxAccessLogPaths []string
}
CommonDim is the set of dimensions that apply to all metrics
func NewCommonDim ¶
func (*CommonDim) ToDimensions ¶
ToDimensions returns the set of common agent dimensions Ensures dimensions are generated in the same order every time, as required by control plane
type MetricsHandler ¶
type MetricsReportBundle ¶ added in v2.25.0
type MetricsReportBundle struct {
Data []*proto.MetricsReport
}
type NginxCollectorConfig ¶
type NginxSource ¶
type NginxSource interface { Collect(ctx context.Context, wg *sync.WaitGroup, m chan<- *StatsEntityWrapper) Update(dimensions *CommonDim, collectorConf *NginxCollectorConfig) Stop() }
type PerDimension ¶
type Source ¶
type Source interface {
Collect(ctx context.Context, wg *sync.WaitGroup, m chan<- *StatsEntityWrapper)
}
type StatsEntityWrapper ¶ added in v2.25.0
type StatsEntityWrapper struct { Type proto.MetricsReport_Type Data *proto.StatsEntity }
func NewStatsEntityWrapper ¶ added in v2.25.0
func NewStatsEntityWrapper(dims []*proto.Dimension, samples []*proto.SimpleMetric, seType proto.MetricsReport_Type) *StatsEntityWrapper
Click to show internal directories.
Click to hide internal directories.