promremotew

package
v0.0.0-...-43fc98a Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetricMetadataTypeValue = map[string]int32{
	"UNKNOWN":        0,
	"COUNTER":        1,
	"GAUGE":          2,
	"HISTOGRAM":      3,
	"GAUGEHISTOGRAM": 4,
	"SUMMARY":        5,
	"INFO":           6,
	"STATESET":       7,
}

Functions

func MetricFamiliesToWriteRequest

func MetricFamiliesToWriteRequest(mf map[string]*dto.MetricFamily, extraLabels map[string]string) (*prometheusv1.WriteRequest, error)

MetricFamiliesToWriteRequest convert metric family to a writerequest.

func MetricTextToWriteRequest

func MetricTextToWriteRequest(input io.Reader, labels map[string]string) (*prometheusv1.WriteRequest, error)

MetricTextToWriteRequest consumes an io.Reader and return the data in write request format.

func ScrapeAndSendLocalMetrics

func ScrapeAndSendLocalMetrics(ctx context.Context, info PromTelemetryInfo, logger *zap.Logger) error

Types

type PromTelemetryInfo

type PromTelemetryInfo struct {
	PromRemoteURL string
	Labels        map[string]string
}

Jump to

Keyboard shortcuts

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