common

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeTypeID

type AttributeTypeID string
const (
	// AttributeTypeResource is the type for resource attributes
	AttributeTypeResource AttributeTypeID = "resource"

	// AttributeTypeScope is the type for scope attributes
	AttributeTypeScope AttributeTypeID = "scope"

	// AttributeTypeMetric is the type for metric attributes
	AttributeTypeMetric AttributeTypeID = "metric"

	// AttributeTypeSpan is the type for span attributes
	AttributeTypeSpan AttributeTypeID = "span"

	// AttributeTypeLog is the type for log attributes
	AttributeTypeLog AttributeTypeID = "log"
)

func (*AttributeTypeID) UnmarshalText

func (c *AttributeTypeID) UnmarshalText(text []byte) error

type MetricGroup

type MetricGroup struct {
	// Name of the metric group
	Name string `mapstructure:"name,required"`

	// Selectors for building the matchkey for the target signal resource
	TargetSelectors TargetSelectors `mapstructure:"target_selectors,required"`

	// Selectors for building the matchkey for the source metric
	MetricsSelectors []Selector `mapstructure:"metrics_selectors,required"`

	// the metrics to add to the target signal resource
	MetricsMatchers []MetricsToAdd `mapstructure:"metrics_to_add,required"`
}

type MetricsMatcher

type MetricsMatcher struct {
	// Name of metric to be added
	Name string `mapstructure:"name,required"`

	// Attribute key and values that must match for this metric to be added (optional)
	Attributes map[string]string `mapstructure:"include_only_attributes"`

	// New name for the metric (optional)
	NewName string `mapstructure:"new_name"`
}

type MetricsToAdd

type MetricsToAdd struct {
	// InstrumentationScope to match for metric
	InstrumentationScope string `mapstructure:"instrumentation_scope,required"`

	// Metrics to add for this Matcher
	MetricsMatchers []MetricsMatcher `mapstructure:"metrics,required"`
}

type Selector

type Selector struct {
	// Can be one of "resource", "scope", "metric", "span", or "log"
	AttributeType AttributeTypeID `mapstructure:"attribute_type,required"`

	// Name of the attribute to use for matching
	Name string `mapstructure:"name,required"`
}

type TargetSelectors

type TargetSelectors struct {
	// Selectors for spans
	SpansSelectors []Selector `mapstructure:"spans"`

	// Selectors for logs
	LogsSelectors []Selector `mapstructure:"logs"`
}

Jump to

Keyboard shortcuts

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