Skip to content

Commit

Permalink
Update Metrics Transform Processor config comments (#2143)
Browse files Browse the repository at this point in the history
  • Loading branch information
james-bebbington committed Jan 20, 2021
1 parent e443ca9 commit a20b08b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions processor/metricstransformprocessor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ type Config struct {

// Transform defines the transformation applied to the specific metric
type Transform struct {

// --- SPECIFY WHICH METRIC(S) TO MATCH ---

// MetricIncludeFilter is used to select the metric(s) to operate on.
// REQUIRED
MetricIncludeFilter FilterConfig `mapstructure:",squash"`
Expand All @@ -71,10 +74,17 @@ type Transform struct {
// DEPRECATED. Use MetricIncludeFilter instead.
MetricName string `mapstructure:"metric_name"`

// Action specifies the action performed on the matched metric.
// --- SPECIFY THE ACTION TO TAKE ON THE MATCHED METRIC(S) ---

// Action specifies the action performed on the matched metric. Action specifies
// if the operations (specified below) are performed on metrics in place (update),
// on an inserted clone (insert), or on a new combined metric that includes all
// data points from the set of matching metrics (combine).
// REQUIRED
Action ConfigAction `mapstructure:"action"`

// --- SPECIFY HOW TO TRANSFORM THE METRIC GENERATED AS A RESULT OF APPLYING THE ABOVE ACTION ---

// NewName specifies the name of the new metric when inserting or updating.
// REQUIRED only if Action is INSERT.
NewName string `mapstructure:"new_name"`
Expand All @@ -90,7 +100,7 @@ type Transform struct {
// SubmatchCase specifies what case to use for label values created from regexp submatches.
SubmatchCase SubmatchCase `mapstructure:"submatch_case"`

// Operations contains a list of operations that will be performed on the selected metric.
// Operations contains a list of operations that will be performed on the resulting metric(s).
Operations []Operation `mapstructure:"operations"`
}

Expand Down

0 comments on commit a20b08b

Please sign in to comment.