diff --git a/processor/metricstransformprocessor/config.go b/processor/metricstransformprocessor/config.go index 210cab1c36359..1527fb87e0b8c 100644 --- a/processor/metricstransformprocessor/config.go +++ b/processor/metricstransformprocessor/config.go @@ -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"` @@ -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"` @@ -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"` }