Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgeGauge ¶
type AgeGauge struct {
// contains filtered or unexported fields
}
AgeGauge represents a value that is the time in seconds since the epoch at which an event has successfully occurred, or 0 to use the current time in epoch seconds. After an Age Gauge has been set, it will continue reporting the number of seconds since the last time recorded, for as long as the spectatord process runs. The purpose of this metric type is to enable users to more easily implement the Time Since Last Success alerting pattern.
To set `now()` as the last success, set a value of 0.
func NewAgeGauge ¶
NewAgeGauge generates a new gauge, using the provided meter identifier.
type Counter ¶
type Counter struct {
// contains filtered or unexported fields
}
Counter is used to measure the rate at which some event is occurring. This type is safe for concurrent use.
You can find more about this type by viewing the relevant Java Spectator documentation here:
https://netflix.github.io/spectator/en/latest/intro/counter/
func NewCounter ¶
NewCounter generates a new counter, using the provided meter identifier.
type DistributionSummary ¶
type DistributionSummary struct {
// contains filtered or unexported fields
}
DistributionSummary is used to track the distribution of events. This is safe for concurrent use.
You can find more about this type by viewing the relevant Java Spectator documentation here:
https://netflix.github.io/spectator/en/latest/intro/dist-summary/
func NewDistributionSummary ¶
func NewDistributionSummary(id *Id, writer writer.Writer) *DistributionSummary
NewDistributionSummary generates a new distribution summary, using the provided meter identifier.
func (*DistributionSummary) MeterId ¶
func (d *DistributionSummary) MeterId() *Id
MeterId returns the meter identifier.
func (*DistributionSummary) Record ¶
func (d *DistributionSummary) Record(amount int64)
Record records a value to track within the distribution.
type Gauge ¶
type Gauge struct {
// contains filtered or unexported fields
}
Gauge represents a value that is sampled at a specific point in time. One example might be the pending messages in a queue. This type is safe for concurrent use.
You can find more about this type by viewing the relevant Java Spectator documentation here:
https://netflix.github.io/spectator/en/latest/intro/gauge/
func NewGaugeWithTTL ¶
NewGaugeWithTTL generates a new gauge, using the provided meter identifier and ttl.
type Id ¶
type Id struct {
// contains filtered or unexported fields
}
Id represents a meter's identifying information and dimensions (tags).
func NewId ¶
NewId generates a new *Id from the metric name, and the tags you want to include on your metric.
func (*Id) MapKey ¶
MapKey computes and saves a key within the struct to be used to uniquely identify this *Id in a map. This does use the information from within the *Id, so it assumes you've not accidentally double-declared this *Id.
func (*Id) Tags ¶
Tags directly exposes the internal tags map. This is not a copy of the map, so any modifications to it will be observed by the *Id.
type MaxGauge ¶
type MaxGauge struct {
// contains filtered or unexported fields
}
MaxGauge represents a value that is sampled at a specific point in time. One example might be the pending messages in a queue. This type is safe for concurrent use.
You can find more about this type by viewing the relevant Java Spectator documentation here:
https://netflix.github.io/spectator/en/latest/intro/gauge/
func NewMaxGauge ¶
NewMaxGauge generates a new gauge, using the provided meter identifier.
type MonotonicCounter ¶
type MonotonicCounter struct {
// contains filtered or unexported fields
}
MonotonicCounter is used to measure the rate at which some event is occurring. This type is safe for concurrent use.
The value is a monotonically increasing number. A minimum of two samples must be received in order for spectatord to calculate a delta value and report it to the backend.
This version of the monotonic counter is intended to support use cases where a data source value needs to be transformed into base units through division (e.g. nanoseconds into seconds), and thus, the data type is float64.
A variety of networking metrics may be reported monotonically and this metric type provides a convenient means of recording these values, at the expense of a slower time-to-first metric.
func NewMonotonicCounter ¶
func NewMonotonicCounter(id *Id, writer writer.Writer) *MonotonicCounter
NewMonotonicCounter generates a new counter, using the provided meter identifier.
func (*MonotonicCounter) MeterId ¶
func (c *MonotonicCounter) MeterId() *Id
MeterId returns the meter identifier.
func (*MonotonicCounter) Set ¶
func (c *MonotonicCounter) Set(value float64)
Set sets a value as the current measurement; spectatord calculates the delta.
type MonotonicCounterUint ¶ added in v2.0.3
type MonotonicCounterUint struct {
// contains filtered or unexported fields
}
MonotonicCounterUint is used to measure the rate at which some event is occurring. This type is safe for concurrent use.
The value is a monotonically increasing number. A minimum of two samples must be received in order for spectatord to calculate a delta value and report it to the backend.
This version of the monotonic counter is intended to support use cases where a data source value can be sampled as-is, because it is already in base units, such as bytes, and thus, the data type is uint64.
A variety of networking metrics may be reported monotonically and this metric type provides a convenient means of recording these values, at the expense of a slower time-to-first metric.
func NewMonotonicCounterUint ¶ added in v2.0.3
func NewMonotonicCounterUint(id *Id, writer writer.Writer) *MonotonicCounterUint
NewMonotonicCounterUint generates a new counter, using the provided meter identifier.
func (*MonotonicCounterUint) MeterId ¶ added in v2.0.3
func (c *MonotonicCounterUint) MeterId() *Id
MeterId returns the meter identifier.
func (*MonotonicCounterUint) Set ¶ added in v2.0.3
func (c *MonotonicCounterUint) Set(value uint64)
Set sets a value as the current measurement; spectatord calculates the delta.
type PercentileDistributionSummary ¶
type PercentileDistributionSummary struct {
// contains filtered or unexported fields
}
PercentileDistributionSummary is a distribution summary used to track the distribution of events, while also presenting the results as percentiles.
func NewPercentileDistributionSummary ¶
func NewPercentileDistributionSummary(id *Id, writer writer.Writer) *PercentileDistributionSummary
NewPercentileDistributionSummary creates a new *PercentileDistributionSummary using the meter identifier.
func (*PercentileDistributionSummary) MeterId ¶
func (p *PercentileDistributionSummary) MeterId() *Id
func (*PercentileDistributionSummary) Record ¶
func (p *PercentileDistributionSummary) Record(amount int64)
Record records an amount to track within the distribution.
type PercentileTimer ¶
type PercentileTimer struct {
// contains filtered or unexported fields
}
PercentileTimer represents timing events, while capturing the histogram (percentiles) of those values.
func NewPercentileTimer ¶
func NewPercentileTimer( id *Id, writer writer.Writer, ) *PercentileTimer
func (*PercentileTimer) MeterId ¶
func (t *PercentileTimer) MeterId() *Id
func (*PercentileTimer) Record ¶
func (t *PercentileTimer) Record(amount time.Duration)
Record records the value for a single event.