debug

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NozzleIngressEnvelopesTotal = "metric_store_nozzle_ingress_envelopes_total"
	NozzleDroppedEnvelopesTotal = "metric_store_nozzle_dropped_envelopes_total"
	NozzleDroppedPointsTotal    = "metric_store_nozzle_dropped_points_total"
	NozzleEgressPointsTotal     = "metric_store_nozzle_egress_points_total"
	NozzleEgressErrorsTotal     = "metric_store_nozzle_egress_errors_total"
	NozzleEgressDurationSeconds = "metric_store_nozzle_egress_duration_seconds"

	AuthProxyRequestDurationSeconds     = "metric_store_auth_proxy_request_duration_seconds"
	AuthProxyCAPIRequestDurationSeconds = "metric_store_auth_proxy_capi_request_duration_seconds"

	MetricStoreIngressPointsTotal                   = "metric_store_ingress_points_total"
	MetricStoreWrittenPointsTotal                   = "metric_store_written_points_total"
	MetricStoreWriteDurationSeconds                 = "metric_store_write_duration_seconds"
	MetricStoreDiskFreeRatio                        = "metric_store_disk_free_ratio"
	MetricStoreExpiredShardsTotal                   = "metric_store_expired_shards_total"
	MetricStorePrunedShardsTotal                    = "metric_store_pruned_shards_total"
	MetricStoreStorageDays                          = "metric_store_storage_days"
	MetricStoreSeriesCount                          = "metric_store_series_count"
	MetricStoreMeasurementsCount                    = "metric_store_measurements_count"
	MetricStoreReadErrorsTotal                      = "metric_store_read_errors_total"
	MetricStoreTagValuesQueryDurationSeconds        = "metric_store_tag_values_query_duration_seconds"
	MetricStoreMeasurementNamesQueryDurationSeconds = "metric_store_measurement_names_query_duration_seconds"
)

Variables

This section is empty.

Functions

func StartServer

func StartServer(addr string, tlsConfig *tls.Config, gatherer prometheus.Gatherer, log *logger.Logger) net.Listener

StartServer listens and serves the health endpoint HTTP handler on a given address. If the server fails to listen or serve the process will exit with a status code of 1.

Types

type MetricRegistrar

type MetricRegistrar interface {
	Set(name string, value float64, labels ...string)
	Add(name string, delta float64, labels ...string)
	Inc(name string, labels ...string)
	Histogram(name string) prometheus.Observer
	Registerer() prometheus.Registerer
	Gatherer() prometheus.Gatherer
}

MetricRegistrar is used to update values of metrics.

type NullGatherer

type NullGatherer struct {
}

func (*NullGatherer) Gather

func (n *NullGatherer) Gather() ([]*dto.MetricFamily, error)

type NullObserver

type NullObserver struct {
}

func (*NullObserver) Observe

func (o *NullObserver) Observe(float64)

type NullRegisterer

type NullRegisterer struct {
}

func (*NullRegisterer) MustRegister

func (n *NullRegisterer) MustRegister(...prometheus.Collector)

func (*NullRegisterer) Register

func (*NullRegisterer) Unregister

func (n *NullRegisterer) Unregister(prometheus.Collector) bool

type NullRegistrar

type NullRegistrar struct {
}

func (*NullRegistrar) Add

func (*NullRegistrar) Add(string, float64, ...string)

func (*NullRegistrar) Gatherer

func (*NullRegistrar) Gatherer() prometheus.Gatherer

func (*NullRegistrar) Histogram

func (*NullRegistrar) Inc

func (*NullRegistrar) Inc(string, ...string)

func (*NullRegistrar) Registerer

func (*NullRegistrar) Registerer() prometheus.Registerer

func (*NullRegistrar) Set

func (*NullRegistrar) Set(string, float64, ...string)

type Registrar

type Registrar struct {
	// contains filtered or unexported fields
}

Registrar maintains a list of metrics to be served by the health endpoint server.

func NewRegistrar

func NewRegistrar(
	log *logger.Logger,
	sourceID string,
	opts ...RegistrarOption,
) *Registrar

NewRegistrar returns an initialized health endpoint registrar configured with the given Prometheus.Registerer and map of Prometheus metrics.

func (*Registrar) Add

func (h *Registrar) Add(name string, delta float64, labels ...string)

Add will add the given value to the counter metric. If the counter metric is not found the process will exit with a status code of 1.

func (*Registrar) Gatherer

func (h *Registrar) Gatherer() prometheus.Gatherer

func (*Registrar) Histogram

func (h *Registrar) Histogram(name string) prometheus.Observer

Histogram will return the histogram observer that matches the name.

func (*Registrar) Inc

func (h *Registrar) Inc(name string, labels ...string)

Inc will increment the counter metric with the given name by 1. If the counter metric is not found the process will exit with a status code of 1.

func (*Registrar) Registerer

func (h *Registrar) Registerer() prometheus.Registerer

func (*Registrar) Set

func (h *Registrar) Set(name string, value float64, labels ...string)

Set will set the given value on the gauge metric with the given name. If the gauge metric is not found the process will exit with a status code of 1.

func (*Registrar) Summary

func (h *Registrar) Summary(name, label string) prometheus.Observer

Summary will return the observer that matches the name and label value

type RegistrarOption

type RegistrarOption func(*Registrar)

RegistrarOption is a function that can be used to set optional configuration when initializing a new Registrar.

func WithConstLabels

func WithConstLabels(labels map[string]string) RegistrarOption

func WithCounter

func WithCounter(name string, opts prometheus.CounterOpts) RegistrarOption

WithCounter will create and register a new counter metric.

func WithDefaultRegistry

func WithDefaultRegistry() RegistrarOption

func WithGauge

func WithGauge(name string, opts prometheus.GaugeOpts) RegistrarOption

WithGauge will create and register a new gauge metric.

func WithHistogram

func WithHistogram(name string, opts prometheus.HistogramOpts) RegistrarOption

WithHistogram will create and register a new Histogram

func WithLabelledCounter

func WithLabelledCounter(name string, opts prometheus.CounterOpts, labelsNames []string) RegistrarOption

func WithLabelledGauge

func WithLabelledGauge(name string, opts prometheus.GaugeOpts, labelsNames []string) RegistrarOption

func WithSummary

func WithSummary(name, label string, opts prometheus.SummaryOpts) RegistrarOption

WithSummary will create and register a new SummaryVec.

Jump to

Keyboard shortcuts

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