Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
 - type BufferSizeGauge
 - type ErrorCounter
 - type EvictionCounter
 - type MetricDefinition
 - type Metrics
 - func (m *Metrics) CreateBatchCounter(exporter string) prometheus.Counter
 - func (m *Metrics) CreateSamplingRate() prometheus.Gauge
 - func (m *Metrics) CreateTimeSpendInLookupAndDelete() prometheus.Histogram
 - func (m *Metrics) NewCounter(def *MetricDefinition, labels ...string) prometheus.Counter
 - func (m *Metrics) NewCounterVec(def *MetricDefinition) *prometheus.CounterVec
 - func (m *Metrics) NewGauge(def *MetricDefinition, labels ...string) prometheus.Gauge
 - func (m *Metrics) NewGaugeVec(def *MetricDefinition) *prometheus.GaugeVec
 - func (m *Metrics) NewHistogram(def *MetricDefinition, buckets []float64, labels ...string) prometheus.Histogram
 
- type PromConnectionInfo
 - type PromTLS
 - type Settings
 
Constants ¶
      View Source
      
  
const ( TypeCounter metricType = "counter" TypeGauge metricType = "gauge" TypeHistogram metricType = "histogram" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferSizeGauge ¶
type BufferSizeGauge struct {
	// contains filtered or unexported fields
}
    BufferSizeGauge provides syntactic sugar hidding prom's gauge tailored for buffer size
func (*BufferSizeGauge) WithBufferName ¶
func (g *BufferSizeGauge) WithBufferName(bufferName string) prometheus.Gauge
type ErrorCounter ¶
type ErrorCounter struct {
	// contains filtered or unexported fields
}
    func (*ErrorCounter) WithErrorName ¶
func (c *ErrorCounter) WithErrorName(component, errName string) prometheus.Counter
type EvictionCounter ¶
type EvictionCounter struct {
	// contains filtered or unexported fields
}
    EvictionCounter provides syntactic sugar hidding prom's counter for eviction purpose
func (*EvictionCounter) WithSource ¶
func (c *EvictionCounter) WithSource(source string) prometheus.Counter
func (*EvictionCounter) WithSourceAndReason ¶
func (c *EvictionCounter) WithSourceAndReason(source, reason string) prometheus.Counter
type MetricDefinition ¶
type Metrics ¶
type Metrics struct {
	Settings *Settings
	// Shared metrics:
	EvictionCounter       *EvictionCounter
	EvictedFlowsCounter   *EvictionCounter
	EvictedPacketsCounter *EvictionCounter
	DroppedFlowsCounter   *EvictionCounter
	FilteredFlowsCounter  *EvictionCounter
	BufferSizeGauge       *BufferSizeGauge
	Errors                *ErrorCounter
}
    func NewMetrics ¶
func (*Metrics) CreateBatchCounter ¶
func (m *Metrics) CreateBatchCounter(exporter string) prometheus.Counter
func (*Metrics) CreateSamplingRate ¶
func (m *Metrics) CreateSamplingRate() prometheus.Gauge
func (*Metrics) CreateTimeSpendInLookupAndDelete ¶
func (m *Metrics) CreateTimeSpendInLookupAndDelete() prometheus.Histogram
func (*Metrics) NewCounter ¶
func (m *Metrics) NewCounter(def *MetricDefinition, labels ...string) prometheus.Counter
func (*Metrics) NewCounterVec ¶
func (m *Metrics) NewCounterVec(def *MetricDefinition) *prometheus.CounterVec
func (*Metrics) NewGauge ¶
func (m *Metrics) NewGauge(def *MetricDefinition, labels ...string) prometheus.Gauge
func (*Metrics) NewGaugeVec ¶
func (m *Metrics) NewGaugeVec(def *MetricDefinition) *prometheus.GaugeVec
func (*Metrics) NewHistogram ¶
func (m *Metrics) NewHistogram(def *MetricDefinition, buckets []float64, labels ...string) prometheus.Histogram
type PromConnectionInfo ¶
type Settings ¶
type Settings struct {
	PromConnectionInfo
	Prefix string
}
     Click to show internal directories. 
   Click to hide internal directories.