transform

package
v1.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UNINDEXED_LABELS = map[string]bool{
	"uri":            true,
	"content_length": true,
	"user_agent":     true,
	"request_id":     true,
	"forwarded":      true,
	"remote_address": true,
}

Functions

func ConvertLabels added in v1.2.1

func ConvertLabels(point *rpc.Point) labels.Labels

func DurationToNanoseconds added in v1.4.3

func DurationToNanoseconds(t time.Duration) int64

func DurationToSeconds added in v1.2.1

func DurationToSeconds(t time.Duration) float64

func IsValidFloat added in v1.2.1

func IsValidFloat(value float64) bool

func MillisecondsToNanoseconds

func MillisecondsToNanoseconds(ms int64) int64

func MillisecondsToString

func MillisecondsToString(ms int64) string

func MillisecondsToTime

func MillisecondsToTime(ms int64) time.Time

func NanosecondsToMilliseconds

func NanosecondsToMilliseconds(ns int64) int64

func NanosecondsToSeconds added in v1.4.3

func NanosecondsToSeconds(ns int64) float64

func SanitizeLabelName

func SanitizeLabelName(name string) string

PromQL Label Name Sanitization From: https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels First character: Match if it's NOT A-z or underscore [^A-z_] All others: Match if they're NOT alphanumeric or underscore [\w_]+?

func SanitizeMetricName

func SanitizeMetricName(name string) string

PromQL Metric Name Sanitization https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels First character: Match if it's NOT A-z, underscore, or colon [^A-z_:] All others: Match if they're NOT alphanumeric, underscore, or colon [\w_:]+?

func SecondsToMilliseconds

func SecondsToMilliseconds(s int64) int64

func ToInfluxFilter

func ToInfluxFilter(matcher *labels.Matcher) (*influxql.BinaryExpr, error)

func ToInfluxFilters

func ToInfluxFilters(matchers []*labels.Matcher) (influxql.Expr, error)

func ToInfluxPoints

func ToInfluxPoints(points []*rpc.Point) []models.Point

Types

type SeriesSetBuilder

type SeriesSetBuilder struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewSeriesBuilder

func NewSeriesBuilder() *SeriesSetBuilder

func (*SeriesSetBuilder) AddSeriesPoints added in v1.2.1

func (b *SeriesSetBuilder) AddSeriesPoints(seriesLabels labels.Labels, points []*query.FloatPoint)

func (*SeriesSetBuilder) Len

func (b *SeriesSetBuilder) Len() int

func (*SeriesSetBuilder) SeriesSet

func (b *SeriesSetBuilder) SeriesSet() storage.SeriesSet

Jump to

Keyboard shortcuts

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