v0.13.0 Latest Latest

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 2 Imported by: 0



Package filtermetric is a helper package for processing metrics.



This section is empty.


This section is empty.


This section is empty.


type MatchProperties

type MatchProperties struct {
	// MatchConfig configures the matching patterns used when matching metric properties.
	filterset.Config `mapstructure:",squash"`

	// MetricNames specifies the list of string patterns to match metric names against.
	// A match occurs if the metric name matches at least one string pattern in this list.
	MetricNames []string `mapstructure:"metric_names"`

MatchProperties specifies the set of properties in a metric to match against and the type of string pattern matching to use.

type Matcher

type Matcher struct {
	// contains filtered or unexported fields

Matcher matches metrics by metric properties against prespecified values for each property.

func NewMatcher

func NewMatcher(config *MatchProperties) (Matcher, error)

NewMatcher constructs a metric Matcher that can be used to match metrics by metric properties. For each supported metric property, the Matcher accepts a set of prespecified values. An incoming metric matches on a property if the property matches at least one of the prespecified values. A metric only matches if every metric property configured on the Matcher is a match.

The metric Matcher supports matching by the following metric properties: - Metric name

func (*Matcher) MatchMetric

func (m *Matcher) MatchMetric(metric pdata.Metric) bool

MatchMetric matches a metric using the metric properties configured on the Matcher. A metric only matches if every metric property configured on the Matcher is a match.

Jump to

Keyboard shortcuts

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