metadataparser

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseMetadataConfig

func ParseMetadataConfig(metadataContentYaml []byte) ([]*metadata.MetricsMetadata, error)

Types

type AggregationType added in v0.39.0

type AggregationType string
const (
	UnknownAggregationType    AggregationType = "unknown"
	DeltaAggregationType      AggregationType = "delta"
	CumulativeAggregationType AggregationType = "cumulative"
)

type Label

type Label struct {
	Name       string             `yaml:"name"`
	ColumnName string             `yaml:"column_name"`
	ValueType  metadata.ValueType `yaml:"value_type"`
}

type Metadata

type Metadata struct {
	Name                string   `yaml:"name"`
	Query               string   `yaml:"query"`
	MetricNamePrefix    string   `yaml:"metric_name_prefix"`
	TimestampColumnName string   `yaml:"timestamp_column_name"`
	HighCardinality     bool     `yaml:"high_cardinality"`
	Labels              []Label  `yaml:"labels"`
	Metrics             []Metric `yaml:"metrics"`
}

func (Metadata) MetricsMetadata

func (m Metadata) MetricsMetadata() (*metadata.MetricsMetadata, error)

type MetadataConfig

type MetadataConfig struct {
	Metadata []Metadata `yaml:"metadata"`
}

type Metric

type Metric struct {
	Label    `yaml:",inline"`
	DataType MetricType `yaml:"data"`
	Unit     string     `yaml:"unit"`
}

type MetricDataType added in v0.39.0

type MetricDataType string
const (
	UnknownMetricDataType MetricDataType = "unknown"
	GaugeMetricDataType   MetricDataType = "gauge"
	SumMetricDataType     MetricDataType = "sum"
)

type MetricType

type MetricType struct {
	DataType    MetricDataType  `yaml:"type"`
	Aggregation AggregationType `yaml:"aggregation"`
	Monotonic   bool            `yaml:"monotonic"`
}

Jump to

Keyboard shortcuts

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