metrics

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package Metrics

Index

Constants

This section is empty.

Variables

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

Functions

func FormatData

func FormatData(mf map[string]*dto.MetricFamily, jobLabel string) *prompb.WriteRequest

FormatData convert metric family to a writerequest

func GetValue

func GetValue(m *dto.Metric) float64

GetValue return the value of a timeserie without the need to give value type

func ParseTextAndFormat

func ParseTextAndFormat(input io.Reader, jobLabel string) (*prompb.WriteRequest, error)

ParseTextAndFormat return the data in the expected prometheus metrics write request format

func ParseTextReader

func ParseTextReader(input io.Reader) (map[string]*dto.MetricFamily, error)

ParseTextReader consumes an io.Reader and returns the MetricFamily

Types

This section is empty.

Jump to

Keyboard shortcuts

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