From 1723cc43901441a11ed501ec22aa8c01f3c98d07 Mon Sep 17 00:00:00 2001 From: Jacob Colvin Date: Sun, 19 Nov 2023 00:22:12 -0500 Subject: [PATCH] Fix filterprocessor OC telemetry name, aggregation --- processor/filterprocessor/telemetry.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/processor/filterprocessor/telemetry.go b/processor/filterprocessor/telemetry.go index f3eb984aa4f1..13cb7d586219 100644 --- a/processor/filterprocessor/telemetry.go +++ b/processor/filterprocessor/telemetry.go @@ -10,6 +10,7 @@ import ( "go.opencensus.io/stats/view" "go.opencensus.io/tag" "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processorhelper" "go.opentelemetry.io/otel/attribute" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor/internal/metadata" @@ -41,24 +42,24 @@ func metricViews() []*view.View { return []*view.View{ { - Name: statMetricsFiltered.Name(), + Name: processorhelper.BuildCustomMetricName(typeStr, statMetricsFiltered.Name()), Measure: statMetricsFiltered, Description: statMetricsFiltered.Description(), - Aggregation: view.Count(), + Aggregation: view.Sum(), TagKeys: processorTagKeys, }, { - Name: statLogsFiltered.Name(), + Name: processorhelper.BuildCustomMetricName(typeStr, statLogsFiltered.Name()), Measure: statLogsFiltered, Description: statLogsFiltered.Description(), - Aggregation: view.Count(), + Aggregation: view.Sum(), TagKeys: processorTagKeys, }, { - Name: statSpansFiltered.Name(), + Name: processorhelper.BuildCustomMetricName(typeStr, statSpansFiltered.Name()), Measure: statSpansFiltered, Description: statSpansFiltered.Description(), - Aggregation: view.Count(), + Aggregation: view.Sum(), TagKeys: processorTagKeys, }, }