Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlags(fs *pflag.FlagSet)
- func Bucket(metricName string, source Source, max int) int
- func FormatTagsKey(source Source, tags Tags) string
- func NormalizeTagKey(key string) string
- type AggregatedMetrics
- type AlertType
- type Backend
- type BackendFactory
- type CacheOptions
- type CachedInstances
- type CachedInstancesFactory
- type CloudProvider
- type CloudProviderFactory
- type Counter
- type Counters
- type Event
- type Events
- type Gauge
- type Gauges
- type HistogramThreshold
- type Instance
- type InstanceInfo
- type Metric
- type MetricConsolidator
- func (mc *MetricConsolidator) Drain(ctx context.Context) []*MetricMap
- func (mc *MetricConsolidator) Fill()
- func (mc *MetricConsolidator) Flush(ctx context.Context)
- func (mc *MetricConsolidator) ReceiveMetricMap(mm *MetricMap)
- func (mc *MetricConsolidator) ReceiveMetrics(metrics []*Metric)
- func (mc *MetricConsolidator) Run(ctx context.Context)
- type MetricMap
- func (mm *MetricMap) AsMetrics() []*Metric
- func (mm *MetricMap) IsEmpty() bool
- func (mm *MetricMap) Merge(mmFrom *MetricMap)
- func (mm *MetricMap) Receive(m *Metric)
- func (mm *MetricMap) Split(count int) []*MetricMap
- func (mm *MetricMap) SplitByTags(tagNames []string) map[string]*MetricMap
- func (mm *MetricMap) String() string
- type MetricType
- type MetricsRunner
- type Nanotime
- type Percentile
- type Percentiles
- type PipelineHandler
- type Priority
- type RawMetricHandler
- type Runnable
- type Runner
- type SendCallback
- type Set
- type Sets
- type Source
- type StringMatch
- type StringMatchList
- type Tags
- type Timer
- type TimerSubtypes
- type Timers
- type Wait
Constants ¶
const ( // StatserInternal is the name used to indicate the use of the internal statser. StatserInternal = "internal" // StatserLogging is the name used to indicate the use of the logging statser. StatserLogging = "logging" // StatserNull is the name used to indicate the use of the null statser. StatserNull = "null" // StatserTagged is the name used to indicate the use of the tagged statser. StatserTagged = "tagged" )
const ( // DefaultMaxCloudRequests is the maximum number of cloud provider requests per second. DefaultMaxCloudRequests = 10 // DefaultBurstCloudRequests is the burst number of cloud provider requests per second. DefaultBurstCloudRequests = DefaultMaxCloudRequests + 5 // DefaultExpiryInterval is the default expiry interval for metrics. DefaultExpiryInterval = 5 * time.Minute // DefaultFlushInterval is the default metrics flush interval. DefaultFlushInterval = 1 * time.Second // DefaultFlushOffset is the default metrics flush interval offset when alignment is enabled DefaultFlushOffset = 0 // DefaultFlushOffset is the default for whether metric flushing should be aligned DefaultFlushAligned = false // DefaultIgnoreHost is the default value for whether the source should be used as the host DefaultIgnoreHost = false // DefaultMetricsAddr is the default address on which to listen for metrics. DefaultMetricsAddr = ":8125" // DefaultMaxQueueSize is the default maximum number of buffered metrics per worker. DefaultMaxQueueSize = 10000 // arbitrary // DefaultMaxConcurrentEvents is the default maximum number of events sent concurrently. DefaultMaxConcurrentEvents = 1024 // arbitrary // DefaultCacheRefreshPeriod is the default cache refresh period. DefaultCacheRefreshPeriod = 1 * time.Minute // DefaultCacheEvictAfterIdlePeriod is the default idle cache eviction period. DefaultCacheEvictAfterIdlePeriod = 10 * time.Minute // DefaultCacheTTL is the default cache TTL for successful lookups. DefaultCacheTTL = 30 * time.Minute // DefaultCacheNegativeTTL is the default cache TTL for failed lookups (errors or when instance was not found). DefaultCacheNegativeTTL = 1 * time.Minute // DefaultInternalNamespace is the default internal namespace DefaultInternalNamespace = "statsd" // DefaultHeartbeatEnabled is the default heartbeat enabled flag DefaultHeartbeatEnabled = false // DefaultReceiveBatchSize is the number of datagrams to read in each receive batch DefaultReceiveBatchSize = 50 // DefaultEstimatedTags is the estimated number of expected tags on an individual metric submitted externally DefaultEstimatedTags = 4 // DefaultConnPerReader is the default for whether to create a connection per reader DefaultConnPerReader = false // DefaultStatserType is the default statser type DefaultStatserType = StatserInternal // DefaultBadLinesPerMinute is the default number of bad lines to allow to log per minute DefaultBadLinesPerMinute = 0 // DefaultServerMode is the default mode to run as, standalone|forwarder DefaultServerMode = "standalone" // DefaultTimerHistogramLimit default upper limit for timer histograms (effectively unlimited) DefaultTimerHistogramLimit = math.MaxUint32 // DefaultLogRawMetric is the default value for whether to log the metrics received from network DefaultLogRawMetric = false )
const ( // ParamBackends is the name of parameter with backends. ParamBackends = "backends" // ParamCloudProvider is the name of parameter with the name of cloud provider. ParamCloudProvider = "cloud-provider" // ParamMaxCloudRequests is the name of parameter with maximum number of cloud provider requests per second. ParamMaxCloudRequests = "max-cloud-requests" // ParamBurstCloudRequests is the name of parameter with burst number of cloud provider requests per second. ParamBurstCloudRequests = "burst-cloud-requests" // ParamDefaultTags is the name of parameter with the list of additional tags. ParamDefaultTags = "default-tags" // ParamInternalTags is the name of parameter with the list of tags for internal metrics. ParamInternalTags = "internal-tags" // ParamInternalNamespace is the name of parameter with the namespace for internal metrics. ParamInternalNamespace = "internal-namespace" // ParamExpiryInterval is the name of parameter with expiry interval for metrics. ParamExpiryInterval = "expiry-interval" // ParamExpiryIntervalCounter is the name of parameter which overrides counter expiry interval for metrics. ParamExpiryIntervalCounter = "expiry-interval-counter" // ParamExpiryIntervalGauge is the name of parameter with overrides gauge expiry interval for metrics. ParamExpiryIntervalGauge = "expiry-interval-gauge" // ParamExpiryIntervalSet is the name of parameter with overrides set expiry interval for metrics. ParamExpiryIntervalSet = "expiry-interval-set" // ParamExpiryIntervalTimer is the name of parameter with overrides timer expiry interval for metrics. ParamExpiryIntervalTimer = "expiry-interval-timer" // ParamFlushInterval is the name of parameter with metrics flush interval. ParamFlushInterval = "flush-interval" // ParamFlushInterval is the name of parameter with metrics flush interval alignment. ParamFlushOffset = "flush-offset" // ParamFlushInterval is the name of parameter with metrics flush interval alignment enable state. ParamFlushAligned = "flush-aligned" // ParamIgnoreHost is the name of parameter indicating if the source should be used as the host ParamIgnoreHost = "ignore-host" // ParamMaxReaders is the name of parameter with number of socket readers. ParamMaxReaders = "max-readers" // ParamMaxParsers is the name of the parameter with the number of goroutines that parse datagrams into metrics. ParamMaxParsers = "max-parsers" // ParamMaxWorkers is the name of parameter with number of goroutines that aggregate metrics. ParamMaxWorkers = "max-workers" // ParamMaxQueueSize is the name of parameter with maximum number of buffered metrics per worker. ParamMaxQueueSize = "max-queue-size" // ParamMaxConcurrentEvents is the name of parameter with maximum number of events sent concurrently. ParamMaxConcurrentEvents = "max-concurrent-events" // ParamEstimatedTags is the name of parameter with estimated number of tags per metric ParamEstimatedTags = "estimated-tags" // ParamCacheRefreshPeriod is the name of parameter with cache refresh period. ParamCacheRefreshPeriod = "cloud-cache-refresh-period" // ParamCacheEvictAfterIdlePeriod is the name of parameter with idle cache eviction period. ParamCacheEvictAfterIdlePeriod = "cloud-cache-evict-after-idle-period" // ParamCacheTTL is the name of parameter with cache TTL for successful lookups. ParamCacheTTL = "cloud-cache-ttl" // ParamCacheNegativeTTL is the name of parameter with cache TTL for failed lookups (errors or when instance was not found). ParamCacheNegativeTTL = "cloud-cache-negative-ttl" // ParamMetricsAddr is the name of parameter with address on which to listen for metrics. ParamMetricsAddr = "metrics-addr" // ParamNamespace is the name of parameter with namespace for all metrics. ParamNamespace = "namespace" // ParamStatserType is the name of parameter with type of statser. ParamStatserType = "statser-type" // ParamPercentThreshold is the name of parameter with list of applied percentiles. ParamPercentThreshold = "percent-threshold" // ParamHeartbeatEnabled is the name of the parameter with the heartbeat enabled ParamHeartbeatEnabled = "heartbeat-enabled" // ParamReceiveBatchSize is the name of the parameter with the number of datagrams to read in each receive batch ParamReceiveBatchSize = "receive-batch-size" // ParamConnPerReader is the name of the parameter indicating whether to create a connection per reader ParamConnPerReader = "conn-per-reader" // ParamBadLineRateLimitPerMinute is the name of the parameter indicating how many bad lines can be logged per minute ParamBadLinesPerMinute = "bad-lines-per-minute" // ParamServerMode is the name of the parameter used to configure the server mode. ParamServerMode = "server-mode" // ParamHostname allows hostname overrides ParamHostname = "hostname" // ParamTimerHistogramLimit upper limit of timer histogram buckets that can be specified ParamTimerHistogramLimit = "timer-histogram-limit" // ParamLogRawMetric enables custom metrics to be printed to stdout ParamLogRawMetric = "log-raw-metric" )
const StatsdSourceID = "s"
StatsdSourceID stores the key used to tag metrics with the origin IP address. Should be short to avoid extra hashing and memory overhead for map operations.
Variables ¶
var DefaultBackends = []string{"graphite"}
DefaultBackends is the list of default backends' names.
var DefaultInternalTags = Tags{}
DefaultInternalTags is the default list of additional tags on internal metrics
var DefaultMaxParsers = runtime.NumCPU()
DefaultMaxParsers is the default number of goroutines that parse datagrams into metrics.
var DefaultMaxReaders = minInt(8, runtime.NumCPU())
DefaultMaxReaders is the default number of socket reading goroutines.
var DefaultMaxWorkers = runtime.NumCPU()
DefaultMaxWorkers is the default number of goroutines that aggregate metrics.
var DefaultPercentThreshold = []float64{90}
DefaultPercentThreshold is the default list of applied percentiles.
var DefaultTags = Tags{}
DefaultTags is the default list of additional tags.
Functions ¶
func FormatTagsKey ¶
func NormalizeTagKey ¶
NormalizeTagKey cleans up the key of a tag.
Types ¶
type AggregatedMetrics ¶
type AggregatedMetrics interface { MetricsName() string Delete(string) DeleteChild(string, string) HasChildren(string) bool }
AggregatedMetrics is an interface for aggregated metrics.
type AlertType ¶
type AlertType byte
AlertType is the type of alert.
func (AlertType) StringWithEmptyDefault ¶
StringWithEmptyDefault returns empty string for default alert type.
type Backend ¶
type Backend interface { // Name returns the name of the backend. Name() string // SendMetricsAsync flushes the metrics to the backend, preparing payload synchronously but doing the send asynchronously. // Must not read/write MetricMap asynchronously. SendMetricsAsync(context.Context, *MetricMap, SendCallback) // SendEvent sends event to the backend. SendEvent(context.Context, *Event) error }
Backend represents a backend. If Backend implements the Runner interface, it's started in a new goroutine at creation.
type BackendFactory ¶
type BackendFactory func(config *viper.Viper, logger logrus.FieldLogger, pool *transport.TransportPool) (Backend, error)
BackendFactory is a function that returns a Backend.
type CacheOptions ¶
type CacheOptions struct { CacheRefreshPeriod time.Duration CacheEvictAfterIdlePeriod time.Duration CacheTTL time.Duration CacheNegativeTTL time.Duration }
CacheOptions holds cache behaviour configuration.
type CachedInstances ¶
type CachedInstances interface { // Peek fetches instance information from the cache. // The cache is also a negative cache - may be a cache hit but the returned instance is nil. Peek(Source) (*Instance, bool) // IpSink returns a channel that can be used to supply IP addresses for which information needs // to be fetched and cached. IpSink() chan<- Source // InfoSource returns a channel that can be used to receive information about IPs. InfoSource() <-chan InstanceInfo // EstimatedTags returns a guess for how many tags to pre-allocate EstimatedTags() int }
type CachedInstancesFactory ¶
type CachedInstancesFactory func(v *viper.Viper, logger logrus.FieldLogger, version string) (CachedInstances, error)
CachedInstancesFactory is a function that returns a CachedInstances instance.
type CloudProvider ¶
type CloudProvider interface { // Name returns the name of the cloud provider. Name() string // Instance returns instances details from the cloud provider. // ip -> nil pointer if instance was not found. // map is returned even in case of errors because it may contain partial data. Instance(context.Context, ...Source) (map[Source]*Instance, error) // MaxInstancesBatch returns maximum number of instances that could be requested via the Instance method. MaxInstancesBatch() int // EstimatedTags returns a guess of how many tags are likely to be added by the CloudProvider EstimatedTags() int }
CloudProvider represents a cloud provider. If CloudProvider implements the Runner interface, it's started in a new goroutine at creation.
type CloudProviderFactory ¶
type CloudProviderFactory func(v *viper.Viper, logger logrus.FieldLogger, version string) (CloudProvider, error)
CloudProviderFactory is a function that returns a CloudProvider.
type Counter ¶
type Counter struct { PerSecond float64 // The calculated per second rate Value int64 // The numeric value of the metric Timestamp Nanotime // Last time value was updated Source Source // Source of the metric Tags Tags // The tags for the counter }
Counter is used for storing aggregated values for counters.
type Counters ¶
Counters stores a map of counters by tags.
func (Counters) DeleteChild ¶
DeleteChild deletes the metrics from the collection for the given tags.
func (Counters) HasChildren ¶
HasChildren returns whether there are more children nested under the key.
func (Counters) MetricsName ¶
MetricsName returns the name of the aggregated metrics collection.
type Event ¶
type Event struct { // Title of the event. Title string // Text of the event. Supports line breaks. Text string // DateHappened of the event. Unix epoch timestamp. Default is now when not specified in incoming metric. DateHappened int64 // AggregationKey of the event, to group it with some other events. AggregationKey string // SourceTypeName of the event. SourceTypeName string // Tags of the event. Tags Tags // Source of the metric Source Source // Priority of the event. Priority Priority // AlertType of the event. AlertType AlertType }
Event represents an event, described at http://docs.datadoghq.com/guides/dogstatsd/
func (*Event) AddTagsSetSource ¶
type Gauge ¶
type Gauge struct { Value float64 // The numeric value of the metric Timestamp Nanotime // Last time value was updated Source Source // Source of the metric Tags Tags // The tags for the gauge }
Gauge is used for storing aggregated values for gauges.
type Gauges ¶
Gauges stores a map of gauges by tags.
func (Gauges) DeleteChild ¶
DeleteChild deletes the metrics from the collection for the given tags.
func (Gauges) HasChildren ¶
HasChildren returns whether there are more children nested under the key.
func (Gauges) MetricsName ¶
MetricsName returns the name of the aggregated metrics collection.
type HistogramThreshold ¶
type HistogramThreshold float64
type InstanceInfo ¶
type Metric ¶
type Metric struct { Name string // The name of the metric Value float64 // The numeric value of the metric Rate float64 // The sampling rate of the metric Tags Tags // The tags for the metric TagsKey string // The tags rendered as a string to uniquely identify the tagset in a map. Sort of a cache. Will be removed at some point. StringValue string // The string value for some metrics e.g. Set // Source is the source of the metric, its lifecycle is: // - If ignore-host is set, it will be set to the `host` tag if present, otherwise blank. If ignore-host is not set, it will be set to the sending IP // - If the cloud provider is enabled, it will attempt to perform a lookup of this value to find a new value (instance ID, pod ID, etc) // - If the tag handler matches a `drop-host` filter, it will be removed // - Backends treat it inconsistently Source Source // Source of the metric. In order of Timestamp Nanotime // Most accurate known timestamp of this metric Type MetricType // The type of metric DoneFunc func() // Returns the metric to the pool. May be nil. Call Metric.Done(), not this. }
Metric represents a single data collected datapoint.
func (*Metric) AddTagsSetSource ¶
func (*Metric) Bucket ¶
Bucket will pick a distribution bucket for this metric to land in. max is exclusive.
func (*Metric) Done ¶
func (m *Metric) Done()
Done invokes DoneFunc if it's set, returning the metric to the pool.
func (*Metric) FormatTagsKey ¶
type MetricConsolidator ¶
type MetricConsolidator struct {
// contains filtered or unexported fields
}
MetricConsolidator will consolidate metrics randomly in to a slice of MetricMaps, and either send the slice to the provided channel, or make them available synchronously through Drain/Fill. Run can also be started in a long running goroutine to perform flushing, or Flush can be called externally to trigger the channel send.
Used to consolidate metrics such as: - counter[name=x, value=1] - counter[name=x, value=1] - counter[name=x, value=1] - counter[name=x, value=1] - counter[name=x, value=1]
in to: - counter[name=x, value=5]
Similar consolidation is performed for other metric types.
func NewMetricConsolidator ¶
func NewMetricConsolidator(spots int, flushInterval time.Duration, sink chan<- []*MetricMap) *MetricConsolidator
func (*MetricConsolidator) Drain ¶
func (mc *MetricConsolidator) Drain(ctx context.Context) []*MetricMap
Drain will collect all the MetricMaps in the MetricConsolidator and return them. If the context.Context is canceled before everything can be collected, they are returned to the MetricConsolidator and nil is returned.
func (*MetricConsolidator) Fill ¶
func (mc *MetricConsolidator) Fill()
Fill re-populates the MetricConsolidator with empty MetricMaps, it is the pair to Drain and must be called after a successful Drain, must not be called after a failed Drain.
func (*MetricConsolidator) Flush ¶
func (mc *MetricConsolidator) Flush(ctx context.Context)
Flush will collect all the MetricMaps in to a slice, send them to the channel provided, then create new MetricMaps for new metrics to land in. Not thread-safe.
func (*MetricConsolidator) ReceiveMetricMap ¶
func (mc *MetricConsolidator) ReceiveMetricMap(mm *MetricMap)
ReceiveMetricMap will merge a MetricMap in to one of the MetricMaps
func (*MetricConsolidator) ReceiveMetrics ¶
func (mc *MetricConsolidator) ReceiveMetrics(metrics []*Metric)
ReceiveMetrics will push a slice of Metrics in to one of the MetricMaps
func (*MetricConsolidator) Run ¶
func (mc *MetricConsolidator) Run(ctx context.Context)
type MetricMap ¶
MetricMap is used for storing aggregated or consolidated Metric values. The keys of each map are metric names.
func NewMetricMap ¶
func NewMetricMap() *MetricMap
func (*MetricMap) AsMetrics ¶
AsMetrics will synthesize Metrics from the MetricMap and return them as a slice
func (*MetricMap) Split ¶
Split will split a MetricMap up in to multiple MetricMaps, where each one contains metrics only for its buckets.
func (*MetricMap) SplitByTags ¶
type MetricType ¶
type MetricType byte
MetricType is an enumeration of all the possible types of Metric.
const ( // COUNTER is statsd counter type COUNTER MetricType = iota // TIMER is statsd timer type TIMER // GAUGE is statsd gauge type GAUGE // SET is statsd set type SET )
func (MetricType) String ¶
func (m MetricType) String() string
type MetricsRunner ¶
type Nanotime ¶
type Nanotime int64
Nanotime is the number of nanoseconds elapsed since January 1, 1970 UTC. Get the value with time.Now().UnixNano().
type Percentile ¶
Percentile is used to store the aggregation for a percentile.
func (*Percentile) String ¶
func (p *Percentile) String() string
String returns the string value of a percentile.
type Percentiles ¶
type Percentiles []Percentile
Percentiles represents an array of percentiles.
func (*Percentiles) Set ¶
func (p *Percentiles) Set(s string, f float64)
Set append a percentile aggregation to the percentiles.
func (*Percentiles) String ¶
func (p *Percentiles) String() string
String returns the string value of percentiles.
type PipelineHandler ¶
type PipelineHandler interface { RawMetricHandler // EstimatedTags returns a guess for how many tags to pre-allocate EstimatedTags() int // DispatchEvent dispatches event to the next step in a pipeline. DispatchEvent(context.Context, *Event) // WaitForEvents waits for all event-dispatching goroutines to finish. WaitForEvents() }
PipelineHandler can be used to handle metrics and events, it provides an estimate of how many tags it may add.
type Priority ¶
type Priority byte
Priority of an event.
func (Priority) StringWithEmptyDefault ¶
StringWithEmptyDefault returns empty string for default priority.
type RawMetricHandler ¶
RawMetricHandler is an interface that accepts a Metric for processing. Raw refers to pre-aggregation, not pre-consolidation.
type Runnable ¶
Runnable is a long running function intended to be launched in a goroutine.
func MaybeAppendRunnable ¶
type SendCallback ¶
type SendCallback func([]error)
SendCallback is called by Backend.SendMetricsAsync() to notify about the result of operation. A list of errors is passed to the callback. It may be empty or contain nil values. Every non-nil value is an error that happened while sending metrics.
type Set ¶
type Set struct { Values map[string]struct{} Timestamp Nanotime // Last time value was updated Source Source // Hostname of the source of the metric Tags Tags // The tags for the set }
Set is used for storing aggregated values for sets.
type Sets ¶
Sets stores a map of sets by tags.
func (Sets) DeleteChild ¶
DeleteChild deletes the metrics from the collection for the given tags.
func (Sets) HasChildren ¶
HasChildren returns whether there are more children nested under the key.
func (Sets) MetricsName ¶
MetricsName returns the name of the aggregated metrics collection.
type Source ¶
type Source string
Source is a v4/v6 IP address. We do not use net.IP because it will involve conversion to string and back several times.
const UnknownSource Source = ""
UnknownSource is an IP of an unknown source.
type StringMatch ¶
type StringMatch struct {
// contains filtered or unexported fields
}
func NewStringMatch ¶
func NewStringMatch(s string) StringMatch
func (StringMatch) Match ¶
func (sm StringMatch) Match(s string) bool
Match indicates if the provided string matches the criteria for this StringMatch
type StringMatchList ¶
type StringMatchList []StringMatch
func (StringMatchList) MatchAny ¶
func (sml StringMatchList) MatchAny(s string) bool
MatchAny indicates if s matches anything in the list, returns false if the list is empty
func (StringMatchList) MatchAnyMultiple ¶
func (sml StringMatchList) MatchAnyMultiple(tests []string) bool
MatchMultipleAny indicates if any string passed matches anything in the list, returns false if sml or tests is empty
type Tags ¶
type Tags []string
Tags represents a list of tags. Tags can be of two forms: 1. "key:value". "value" may contain column(s) as well. 2. "tag". No column. Each tag's key and/or value may contain characters invalid for a particular backend. Backends are expected to handle them appropriately. Different backends may have different sets of valid characters so it is undesirable to have restrictions on the input side.
func (Tags) SortedString ¶
SortedString sorts the tags alphabetically and returns a comma-separated string representation of the tags. Note that this method may mutate the original object.
type Timer ¶
type Timer struct { Count int // The number of timers in the series SampledCount float64 // Number of timings received, divided by sampling rate PerSecond float64 // The calculated per second rate Mean float64 // The mean time of the series Median float64 // The median time of the series Min float64 // The minimum time of the series Max float64 // The maximum time of the series StdDev float64 // The standard deviation for the series Sum float64 // The sum for the series SumSquares float64 // The sum squares for the series Values []float64 // The numeric value of the metric Percentiles Percentiles // The percentile aggregations of the metric Timestamp Nanotime // Last time value was updated Source Source // Hostname of the source of the metric Tags Tags // The tags for the timer // Map bounds to count of measures seen in that bucket. // This map only non-empty if the metric specifies histogram aggregation in its tags. Histogram map[HistogramThreshold]int }
Timer is used for storing aggregated values for timers.
func NewTimerValues ¶
NewTimerValues initialises a new timer only from Values array
type TimerSubtypes ¶
type TimerSubtypes struct { Lower bool LowerPct bool // pct Upper bool UpperPct bool // pct Count bool CountPct bool // pct CountPerSecond bool Mean bool MeanPct bool // pct Median bool StdDev bool Sum bool SumPct bool // pct SumSquares bool SumSquaresPct bool // pct }
func DisabledSubMetrics ¶
func DisabledSubMetrics(viper *viper.Viper) TimerSubtypes
type Timers ¶
Timers stores a map of timers by tags.
func (Timers) DeleteChild ¶
DeleteChild deletes the metrics from the collection for the given tags.
func (Timers) HasChildren ¶
HasChildren returns whether there are more children nested under the key.
func (Timers) MetricsName ¶
MetricsName returns the name of the aggregated metrics collection.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
internal
|
|
fixtures
This is for test fixtures only.
|
This is for test fixtures only. |
pkg
|
|
statsd
Package statsd implements functionality for creating servers compatible with the statsd protocol.
|
Package statsd implements functionality for creating servers compatible with the statsd protocol. |