Documentation
¶
Index ¶
Constants ¶
View Source
const ( MetricsKindAbsolute MetricsKind = "absolute" // MetricsKindIncremental default if not defined MetricsKindIncremental MetricsKind = "incremental" MetricsTypeCounter MetricsType = "counter" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogToMetric ¶
type LogToMetric struct {
// Type is required to be 'log_to_metric'
Type string `json:"type" yaml:"type" toml:"type"`
// Inputs is the IDs of the components feeding into this component
Inputs []string `json:"inputs" yaml:"inputs" toml:"inputs"`
// Metrics is the spec for the Metrics being exposed
Metrics []Metric `json:"metrics" yaml:"metrics" toml:"metrics"`
}
LogToMetric is the configuration for the log_to_metric transform
func New ¶
func New(name string, metricsType MetricsType, tags Tags, inputs ...string) *LogToMetric
type Metric ¶
type Metric struct {
Field string `json:"field" yaml:"field" toml:"field"`
MetricName string `json:"name,omitempty" yaml:"name,omitempty" toml:"name,omitempty"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty" toml:"namespace,omitempty"`
Kind MetricsKind `json:"kind,omitempty" yaml:"kind,omitempty" toml:"kind,omitempty"`
Type MetricsType `json:"type" yaml:"type" toml:"type"`
// Tags optional tags (or labels) to apply to the metric
Tags Tags `json:"tags,omitempty" yaml:"tags,omitempty" toml:"tags,omitempty,multiline"`
}
type MetricsKind ¶
type MetricsKind string
type MetricsType ¶
type MetricsType string
Click to show internal directories.
Click to hide internal directories.