metrics

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package metrics provides functionality for building Prometheus-compatible structs.

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL