paths

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatCarbon            FormatType = 1
	FormatCarbonTags                   = 2
	FormatCarbonOpenMetrics            = 3
)

Format values.

Variables

This section is empty.

Functions

func InitPathsCache

func InitPathsCache(pathsCacheTTL time.Duration, pathsCachePurgeInterval time.Duration)

InitPathsCache inits cache for the paths.

func MetricLabelsFromPath

func MetricLabelsFromPath(path string, prefix string) ([]*prompb.Label, error)

MetricLabelsFromPath provides labels from given path.

func MetricLabelsFromTags

func MetricLabelsFromTags(tags map[string]string, prefix string) ([]*prompb.Label, error)

MetricLabelsFromTags provides labels for given tags.

func ToDatapoints

func ToDatapoints(s *model.Sample, format Format, prefix string, rules []*config.Rule, templateData map[string]interface{}) ([]string, error)

ToDatapoints builds points from samples.

Types

type Format

type Format struct {
	Type         FormatType
	FilteredTags []string // Only for Graphite Tag (Only used for FormatCarbonTags)
}

Format describes carbon format; It can include a list of filtered tags that must be exported using FormatCarbon

type FormatType added in v0.4.0

type FormatType int

FormatType describesCarbon format type

Jump to

Keyboard shortcuts

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