Documentation ¶
Index ¶
Constants ¶
View Source
const ( CounterType MetricType = "c" GaugeType MetricType = "g" HistogramType MetricType = "h" TimingType MetricType = "ms" DistributionType MetricType = "d" CounterTypeName TypeName = "counter" GaugeTypeName TypeName = "gauge" HistogramTypeName TypeName = "histogram" TimingTypeName TypeName = "timing" TimingAltTypeName TypeName = "timer" DistributionTypeName TypeName = "distribution" GaugeObserver ObserverType = "gauge" SummaryObserver ObserverType = "summary" HistogramObserver ObserverType = "histogram" DisableObserver ObserverType = "disabled" DefaultObserverType = DisableObserver )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistogramConfig ¶
type HistogramConfig struct {
MaxSize int32 `mapstructure:"max_size"`
}
type MetricType ¶
type MetricType string // From the statsd line e.g., "c", "g", "h"
func (MetricType) FullName ¶
func (t MetricType) FullName() TypeName
type ObserverCategory ¶
type ObserverCategory struct {
// contains filtered or unexported fields
}
type ObserverType ¶
type ObserverType string // How the server will aggregate histogram and timings ("gauge", "summary")
type Parser ¶
type Parser interface { Initialize(enableMetricType bool, enableSimpleTags bool, isMonotonicCounter bool, sendTimerHistogram []TimerHistogramMapping) error GetMetrics() []BatchMetrics Aggregate(line string, addr net.Addr) error }
Parser is something that can map input StatsD strings to OTLP Metric representations.
type StatsDParser ¶
type StatsDParser struct { BuildInfo component.BuildInfo // contains filtered or unexported fields }
StatsDParser supports the Parse method for parsing StatsD messages with Tags.
func (*StatsDParser) Aggregate ¶
func (p *StatsDParser) Aggregate(line string, addr net.Addr) error
Aggregate for each metric line.
func (*StatsDParser) GetMetrics ¶
func (p *StatsDParser) GetMetrics() []BatchMetrics
GetMetrics gets the metrics preparing for flushing and reset the state.
func (*StatsDParser) Initialize ¶
func (p *StatsDParser) Initialize(enableMetricType bool, enableSimpleTags bool, isMonotonicCounter bool, sendTimerHistogram []TimerHistogramMapping) error
type TimerHistogramMapping ¶
type TimerHistogramMapping struct { StatsdType TypeName `mapstructure:"statsd_type"` ObserverType ObserverType `mapstructure:"observer_type"` Histogram HistogramConfig `mapstructure:"histogram"` }
Click to show internal directories.
Click to hide internal directories.