metrics

package
v5.0.4+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TotalEnvelopesReceivedKey               = "TotalEnvelopesReceived"
	LastEnvelopReceivedTimestampKey         = "LastEnvelopReceivedTimestamp"
	TotalMetricsReceivedKey                 = "TotalMetricsReceived"
	LastMetricReceivedTimestampKey          = "LastMetricReceivedTimestamp"
	TotalContainerMetricsReceivedKey        = "TotalContainerMetricsReceived"
	TotalContainerMetricsProcessedKey       = "TotalContainerMetricsProcessed"
	LastContainerMetricReceivedTimestampKey = "LastContainerMetricReceivedTimestamp"
	TotalCounterEventsReceivedKey           = "TotalCounterEventsReceived"
	TotalCounterEventsProcessedKey          = "TotalCounterEventsProcessed"
	LastCounterEventReceivedTimestampKey    = "LastCounterEventReceivedTimestamp"
	TotalHttpStartStopReceivedKey           = "TotalHttpStartStopReceived"
	TotalHttpStartStopProcessedKey          = "TotalHttpStartStopProcessed"
	LastHttpStartStopReceivedTimestampKey   = "LastHttpStartStopReceivedTimestamp"
	TotalValueMetricsReceivedKey            = "TotalValueMetricsReceived"
	TotalValueMetricsProcessedKey           = "TotalValueMetricsProcessed"
	LastValueMetricReceivedTimestampKey     = "LastValueMetricReceivedTimestamp"
	SlowConsumerAlertKey                    = "SlowConsumerAlert"
	LastSlowConsumerAlertTimestampKey       = "LastSlowConsumerAlertTimestamp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerMetric

type ContainerMetric struct {
	Origin           string
	Timestamp        int64
	Deployment       string
	Job              string
	Index            string
	IP               string
	Tags             map[string]string
	ApplicationId    string
	InstanceIndex    int32
	CpuPercentage    float64
	MemoryBytes      uint64
	DiskBytes        uint64
	MemoryBytesQuota uint64
	DiskBytesQuota   uint64
}

type ContainerMetrics

type ContainerMetrics []*ContainerMetric

type CounterEvent

type CounterEvent struct {
	Origin     string
	Timestamp  int64
	Deployment string
	Job        string
	Index      string
	IP         string
	Tags       map[string]string
	Name       string
	Delta      uint64
	Total      uint64
}

type CounterEvents

type CounterEvents []*CounterEvent

type HttpStartStop

type HttpStartStop struct {
	Origin               string
	Timestamp            int64
	Deployment           string
	Job                  string
	Index                string
	IP                   string
	Tags                 map[string]string
	RequestId            string
	Method               string
	Uri                  string
	RemoteAddress        string
	UserAgent            string
	StatusCode           int32
	ContentLength        int64
	ApplicationId        string
	InstanceIndex        int32
	InstanceId           string
	ClientStartTimestamp int64
	ClientStopTimestamp  int64
	ServerStartTimestamp int64
	ServerStopTimestamp  int64
}

type HttpStartStops

type HttpStartStops []*HttpStartStop

type InternalMetrics

type InternalMetrics struct {
	TotalEnvelopesReceived               int64
	LastEnvelopReceivedTimestamp         int64
	TotalMetricsReceived                 int64
	LastMetricReceivedTimestamp          int64
	TotalContainerMetricsReceived        int64
	TotalContainerMetricsProcessed       int64
	TotalContainerMetricsCached          int64
	LastContainerMetricReceivedTimestamp int64
	TotalCounterEventsReceived           int64
	TotalCounterEventsProcessed          int64
	TotalCounterEventsCached             int64
	LastCounterEventReceivedTimestamp    int64
	TotalHttpStartStopReceived           int64
	TotalHttpStartStopProcessed          int64
	TotalHttpStartStopCached             int64
	LastHttpStartStopReceivedTimestamp   int64
	TotalValueMetricsReceived            int64
	TotalValueMetricsProcessed           int64
	TotalValueMetricsCached              int64
	LastValueMetricReceivedTimestamp     int64
	SlowConsumerAlert                    bool
	LastSlowConsumerAlertTimestamp       int64
}

type Store

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

func NewStore

func NewStore(
	metricsExpiration time.Duration,
	metricsCleanupInterval time.Duration,
	deploymentFilter *filters.DeploymentFilter,
	eventFilter *filters.EventFilter,
) *Store

func (*Store) AddMetric

func (s *Store) AddMetric(envelope *events.Envelope)

func (*Store) AlertSlowConsumerError

func (s *Store) AlertSlowConsumerError()

func (*Store) FlushContainerMetrics

func (s *Store) FlushContainerMetrics()

func (*Store) FlushCounterEvents

func (s *Store) FlushCounterEvents()

func (*Store) FlushHttpStartStops

func (s *Store) FlushHttpStartStops()

func (*Store) FlushValueMetrics

func (s *Store) FlushValueMetrics()

func (*Store) GetContainerMetrics

func (s *Store) GetContainerMetrics() ContainerMetrics

func (*Store) GetCounterEvents

func (s *Store) GetCounterEvents() CounterEvents

func (*Store) GetHttpStartStops

func (s *Store) GetHttpStartStops() HttpStartStops

func (*Store) GetInternalMetrics

func (s *Store) GetInternalMetrics() InternalMetrics

func (*Store) GetValueMetrics

func (s *Store) GetValueMetrics() ValueMetrics

func (*Store) SetInternalMetrics

func (s *Store) SetInternalMetrics(internalMetrics InternalMetrics)

type ValueMetric

type ValueMetric struct {
	Origin     string
	Timestamp  int64
	Deployment string
	Job        string
	Index      string
	IP         string
	Tags       map[string]string
	Name       string
	Value      float64
	Unit       string
}

type ValueMetrics

type ValueMetrics []*ValueMetric

Jump to

Keyboard shortcuts

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