Documentation
¶
Overview ¶
Package filtermetric is a helper package for processing metrics.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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