metrics

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OtelIngressSpansTotal   = "metric_store_otel_ingress_spans_total"
	OtelIngressMetricsTotal = "metric_store_otel_ingress_metrics_total"
	OtelDroppedSpansTotal   = "metric_store_otel_dropped_spans_total"
	OtelDroppedMetricsTotal = "metric_store_otel_dropped_metrics_total"
	OtelDeniedSpansTotal    = "metric_store_otel_denied_spans_total"
	OtelDeniedMetricsTotal  = "metric_store_otel_denied_metrics_total"

	OtelEgressSpansTotal             = "metric_store_otel_egress_spans_total"
	OtelEgressMetricsTotal           = "metric_store_otel_egress_metrics_total"
	OtelEgressSpansErrorsTotal       = "metric_store_otel_egress_spans_errors_total"
	OtelEgressMetricsErrorsTotal     = "metric_store_otel_egress_metrics_errors_total"
	OtelEgressSpansDurationSeconds   = "metric_store_otel_egress_spans_duration_seconds"
	OtelEgressMetricsDurationSeconds = "metric_store_otel_egress_metrics_duration_seconds"

	NozzleIngressEnvelopesTotal     = "metric_store_nozzle_ingress_envelopes_total"
	NozzleDroppedEnvelopesTotal     = "metric_store_nozzle_dropped_envelopes_total"
	NozzleSkippedEnvelopsByTagTotal = "metric_store_nozzle_skipped_envelopes_by_tag_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"
	MetricStoreReplayerDiskUsageBytes               = "metric_store_replayer_disk_usage_bytes"
	MetricStoreReplayerQueueErrorsTotal             = "metric_store_replayer_queue_errors_total"
	MetricStoreReplayerQueuedBytesTotal             = "metric_store_replayer_queued_bytes_total"
	MetricStoreReplayerReadErrorsTotal              = "metric_store_replayer_read_errors_total"
	MetricStoreReplayerReplayErrorsTotal            = "metric_store_replayer_replay_errors_total"
	MetricStoreReplayerReplayedBytesTotal           = "metric_store_replayer_replayed_bytes_total"
	MetricStoreDroppedPointsTotal                   = "metric_store_dropped_points_total"
	MetricStoreDistributedPointsTotal               = "metric_store_distributed_points_total"
	MetricStoreDistributedRequestDurationSeconds    = "metric_store_distributed_request_duration_seconds"
	MetricStoreCollectedPointsTotal                 = "metric_store_collected_points_total"
	MetricStorePendingDeletionDroppedPointsTotal    = "metric_store_pending_deletion_dropped_points_total"
)

Variables

This section is empty.

Functions

func StartProfilingServer added in v1.4.3

func StartProfilingServer(addr string, log *logger.Logger) net.Listener

Types

type NullGatherer added in v1.4.3

type NullGatherer struct {
}

func (*NullGatherer) Gather added in v1.4.3

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

type NullObserver added in v1.4.3

type NullObserver struct {
}

func (*NullObserver) Observe added in v1.4.3

func (o *NullObserver) Observe(float64)

type NullRegisterer added in v1.4.3

type NullRegisterer struct {
}

func (*NullRegisterer) MustRegister added in v1.4.3

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

func (*NullRegisterer) Register added in v1.4.3

func (*NullRegisterer) Unregister added in v1.4.3

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

type NullRegistrar added in v1.4.3

type NullRegistrar struct {
}

func (*NullRegistrar) Add added in v1.4.3

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

func (*NullRegistrar) Gatherer added in v1.4.3

func (*NullRegistrar) Gatherer() prometheus.Gatherer

func (*NullRegistrar) Histogram added in v1.4.3

func (*NullRegistrar) Histogram(string, ...string) prometheus.Observer

func (*NullRegistrar) Inc added in v1.4.3

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

func (*NullRegistrar) Registerer added in v1.4.3

func (*NullRegistrar) Registerer() prometheus.Registerer

func (*NullRegistrar) Set added in v1.4.3

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

type PrometheusRegistrar added in v1.4.3

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

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

func NewRegistrar added in v1.4.3

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

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

func (*PrometheusRegistrar) Add added in v1.4.3

func (r *PrometheusRegistrar) 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 (*PrometheusRegistrar) Gatherer added in v1.4.3

func (r *PrometheusRegistrar) Gatherer() prometheus.Gatherer

func (*PrometheusRegistrar) Histogram added in v1.4.3

func (r *PrometheusRegistrar) Histogram(name string, labels ...string) prometheus.Observer

Histogram will return the histogram observer that matches the name.

func (*PrometheusRegistrar) Inc added in v1.4.3

func (r *PrometheusRegistrar) 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 (*PrometheusRegistrar) Registerer added in v1.4.3

func (r *PrometheusRegistrar) Registerer() prometheus.Registerer

func (*PrometheusRegistrar) Set added in v1.4.3

func (r *PrometheusRegistrar) 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 (*PrometheusRegistrar) Summary added in v1.4.3

func (r *PrometheusRegistrar) Summary(name, label string) prometheus.Observer

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

type Registrar added in v1.4.3

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

Registrar is used to update values of metrics.

type RegistrarOption added in v1.4.3

type RegistrarOption func(*PrometheusRegistrar)

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

func WithConstLabels added in v1.4.3

func WithConstLabels(labels map[string]string) RegistrarOption

func WithCounter added in v1.4.3

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

WithCounter will create and register a new counter metric.

func WithGauge added in v1.4.3

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

WithGauge will create and register a new gauge metric.

func WithHistogram added in v1.4.3

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

WithHistogram will create and register a new Histogram

func WithLabelledCounter added in v1.4.3

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

func WithLabelledGauge added in v1.4.3

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

func WithSummary added in v1.4.3

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

WithSummary will create and register a new SummaryVec.

type Server added in v1.4.3

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

func StartMetricsServer added in v1.4.3

func StartMetricsServer(addr string, tlsConfig *tls.Config, log *logger.Logger, registrar Registrar) *Server

StartMetricsServer 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.

func (*Server) Addr added in v1.4.3

func (s *Server) Addr() net.Addr

func (*Server) Close added in v1.4.3

func (s *Server) Close() error

func (*Server) Registrar added in v1.4.3

func (s *Server) Registrar() Registrar

Jump to

Keyboard shortcuts

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