Documentation ¶
Overview ¶
Package statsd provides a client to send basic statd metrics (timer, counter and gauge) to listening UDP StatsD server.
- Copyright (c) 2018-2021, NVIDIA CORPORATION. All rights reserved. *
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements a StatsD client
func (*Client) Send ¶
Send sends metrics to StatsD server bucket - StatsD "bucket" - not to confuse with storage aggCnt - if stats were aggregated - number of stats which were aggregated, 1 otherwise 1/ratio - how many samples are aggregated into single metric see: https://github.com/statsd/statsd/blob/master/docs/metric_types.md#sampling
type Metric ¶
type Metric struct { Type MetricType // time, counter or gauge Name string // Name for this particular metric Value any }
Metric is a generic structure for all type of StatsD metrics
type MetricType ¶
type MetricType int
MetricType is the type of StatsD metric
const ( // Timer is StatsD's timer type Timer MetricType = iota // Counter is StatsD's counter type Counter // Gauge is StatsD's gauge type Gauge // PersistentCounter is StatsD's gauge type which is increased every time by its value PersistentCounter )
Click to show internal directories.
Click to hide internal directories.