http

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package http implements an http server to export metrics in Prometheus format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	ctx context.Context, cfg *server.Config, st store.Store, registry *prometheus.Registry,
) (server.Server, error)

New constructs a http server to server the metrics

func ReadMetrics

func ReadMetrics(
	ctx context.Context, URL string, tlsConfig *tls.Config,
) (map[string]*dto.MetricFamily, error)

ReadMetrics reads the metrics from the endpoint and returns a map of dto.MetricFamily

func WriteMetrics

func WriteMetrics(
	ctx context.Context,
	metricFamilies map[string]*dto.MetricFamily,
	rewrite bool,
	translators []translator.Translator,
	out io.Writer,
) error

WriteMetrics writes the metrics, converting HDR Histogram into Log10 linear histograms.

Types

This section is empty.

Jump to

Keyboard shortcuts

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