Documentation
¶
Overview ¶
Package metrics provides functionality for building Prometheus-compatible structs.
Index ¶
- type PrometheusClient
- func (p *PrometheusClient) PrometheusPush()
- func (p *PrometheusClient) UpdateConnHistogram(endpoint, proberType string, tag string, duration float64)
- func (p *PrometheusClient) UpdateDNSHistogram(endpoint, proberType string, tag string, duration float64)
- func (p *PrometheusClient) UpdateErrorsCounter(endpoint, proberType string, tag, errorMsg string)
- func (p *PrometheusClient) UpdateFirstByteHistogram(endpoint, proberType string, tag string, duration float64)
- func (p *PrometheusClient) UpdateGotConnHistogram(endpoint, proberType string, tag string, duration float64)
- func (p *PrometheusClient) UpdateRequestsCounter(endpoint, proberType string, tag, statusCode string)
- func (p *PrometheusClient) UpdateTLSHistogram(endpoint, proberType string, tag string, duration float64)
- func (p *PrometheusClient) UpdateTotalHistogram(endpoint, proberType string, tag string, duration float64)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrometheusClient ¶
type PrometheusClient struct {
// contains filtered or unexported fields
}
PrometheusClient struct holds information that will be needed during the program's lifecycle regarding prometheus communication
func NewPrometheusClient ¶
func NewPrometheusClient(_ bool, promPushGateway string) *PrometheusClient
NewPrometheusClient initializes a new prometheus clinets that we can use to deal with our metrics
func (*PrometheusClient) PrometheusPush ¶
func (p *PrometheusClient) PrometheusPush()
PrometheusPush sends the collected prometheus stats to the prometheus push gateway
func (*PrometheusClient) UpdateConnHistogram ¶
func (p *PrometheusClient) UpdateConnHistogram(endpoint, proberType string, tag string, duration float64)
UpdateConnHistogram appends metrics values into corresponding Histogram
func (*PrometheusClient) UpdateDNSHistogram ¶
func (p *PrometheusClient) UpdateDNSHistogram(endpoint, proberType string, tag string, duration float64)
UpdateDNSHistogram appends metrics values into corresponding Histogram
func (*PrometheusClient) UpdateErrorsCounter ¶
func (p *PrometheusClient) UpdateErrorsCounter(endpoint, proberType string, tag, errorMsg string)
UpdateErrorsCounter appends metrics values into corresponding Histogram
func (*PrometheusClient) UpdateFirstByteHistogram ¶
func (p *PrometheusClient) UpdateFirstByteHistogram(endpoint, proberType string, tag string, duration float64)
UpdateFirstByteHistogram appends metrics values into corresponding Histogram
func (*PrometheusClient) UpdateGotConnHistogram ¶
func (p *PrometheusClient) UpdateGotConnHistogram(endpoint, proberType string, tag string, duration float64)
UpdateGotConnHistogram appends metrics values into corresponding Histogram
func (*PrometheusClient) UpdateRequestsCounter ¶
func (p *PrometheusClient) UpdateRequestsCounter(endpoint, proberType string, tag, statusCode string)
UpdateRequestsCounter appends metrics values into corresponding Histogram
func (*PrometheusClient) UpdateTLSHistogram ¶
func (p *PrometheusClient) UpdateTLSHistogram(endpoint, proberType string, tag string, duration float64)
UpdateTLSHistogram appends metrics values into corresponding Histogram
func (*PrometheusClient) UpdateTotalHistogram ¶
func (p *PrometheusClient) UpdateTotalHistogram(endpoint, proberType string, tag string, duration float64)
UpdateTotalHistogram appends metrics values into corresponding Histogram