Skip to content

Commit

Permalink
Update naming
Browse files Browse the repository at this point in the history
  • Loading branch information
crobert-1 committed Oct 4, 2024
1 parent bf46798 commit c4deffc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions processor/metricsgenerationprocessor/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func generateCalculatedMetrics(rm pmetric.ResourceMetrics, metric2 pmetric.Metri

if metric.Name() == rule.metric1 {
newMetric := generateMetricFromMatchingAttributes(metric, metric2, rule, logger)
appendMetric(ilm, newMetric, rule.name, rule.unit)
appendNewMetric(ilm, newMetric, rule.name, rule.unit)
}
}
}
Expand Down Expand Up @@ -178,7 +178,7 @@ func generateScalarMetrics(rm pmetric.ResourceMetrics, operand2 float64, rule in
metric := metricSlice.At(j)
if metric.Name() == rule.metric1 {
newMetric := generateMetricFromOperand(metric, operand2, rule.operation, logger)
appendMetric(ilm, newMetric, rule.name, rule.unit)
appendNewMetric(ilm, newMetric, rule.name, rule.unit)
}
}
}
Expand Down Expand Up @@ -231,9 +231,9 @@ func generateMetricFromOperand(from pmetric.Metric, operand2 float64, operation
return to
}

// Append the scope metrics with the new metric. This will only append the passed in metric if it
// Append the new metric to the scope metrics. This will only append the new metric if it
// has data points.
func appendMetric(ilm pmetric.ScopeMetrics, newMetric pmetric.Metric, name, unit string) {
func appendNewMetric(ilm pmetric.ScopeMetrics, newMetric pmetric.Metric, name, unit string) {
dataPointCount := 0
switch newMetric.Type() {
case pmetric.MetricTypeSum:
Expand Down

0 comments on commit c4deffc

Please sign in to comment.