Documentation ¶
Index ¶
- type Metrics
- func (m *Metrics) IncDeletesFailed()
- func (m *Metrics) IncDeletesTotal()
- func (m *Metrics) IncInsertsFailed()
- func (m *Metrics) IncInsertsTotal()
- func (m *Metrics) IncSearchesFailed()
- func (m *Metrics) IncSearchesTotal()
- func (m *Metrics) ObserveDeleteLatency(ctx context.Context, dur time.Duration)
- func (m *Metrics) ObserveInsertLatency(ctx context.Context, dur time.Duration)
- func (m *Metrics) ObserveSearchLatency(ctx context.Context, dur time.Duration)
- func (m *Metrics) Registry() (reg *prometheus.Registry, err error)
- func (m *Metrics) Shutdown(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new Prometheus Metrics instance, with its HTTP server registered on the input port.
func (*Metrics) IncDeletesFailed ¶
func (m *Metrics) IncDeletesFailed()
IncDeletesFailed increases the total count of failed delete requests.
func (*Metrics) IncDeletesTotal ¶
func (m *Metrics) IncDeletesTotal()
IncDeletesTotal increases the total count of delete requests.
func (*Metrics) IncInsertsFailed ¶
func (m *Metrics) IncInsertsFailed()
IncInsertsFailed increases the total count of failed insert requests.
func (*Metrics) IncInsertsTotal ¶
func (m *Metrics) IncInsertsTotal()
IncInsertsTotal increases the total count of insert requests.
func (*Metrics) IncSearchesFailed ¶
func (m *Metrics) IncSearchesFailed()
IncSearchesFailed increases the total count of failed search requests.
func (*Metrics) IncSearchesTotal ¶
func (m *Metrics) IncSearchesTotal()
IncSearchesTotal increases the total count of search requests.
func (*Metrics) ObserveDeleteLatency ¶
ObserveDeleteLatency observes the latency in handling a delete request, registering an exemplar with this latency if the input context carries a valid span.
func (*Metrics) ObserveInsertLatency ¶
ObserveInsertLatency observes the latency in handling an insert request, registering an exemplar with this latency if the input context carries a valid span.
func (*Metrics) ObserveSearchLatency ¶
ObserveSearchLatency observes the latency in handling a search request, registering an exemplar with this latency if the input context carries a valid span.
func (*Metrics) Registry ¶
func (m *Metrics) Registry() (reg *prometheus.Registry, err error)
Registry returns a prometheus.Registry with all set-up collectors for this instance.
The default collectors include the Go collector, the process collector, and the different requests collectors as implemented in Metrics.