Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct { LastTickTime prometheus.Gauge NextTickTime prometheus.Gauge IntervalSeconds prometheus.Gauge }
func NewMetrics ¶
func NewMetrics(reg prometheus.Registerer, subsystem string) *Metrics
type T ¶
Ticker emits ticks at regular time intervals. it's like a time.Ticker, except:
- it doesn't drop ticks for slow receivers, rather, it queues up. so that callers are in control to instrument what's going on.
- it ticks on interval marks or very shortly after. this provides a predictable load pattern (this shouldn't cause too much load contention issues because the next steps in the pipeline just process at their own pace)
- the timestamps are used to mark "last datapoint to query for" and as such, are a configurable amount of seconds in the past
Click to show internal directories.
Click to hide internal directories.