Skip to content

Commit 80a42c0

Browse files
committed
Minor code change
1 parent 60f4845 commit 80a42c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

exporter/awsemfexporter/metric_translator.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ func TranslateCWMetricToEMF(cwMetricLists []*CWMetrics, logger *zap.Logger) []*L
203203

204204
// getCWMetrics translates OTLP Metric to a list of CW Metrics
205205
func getCWMetrics(metric *pdata.Metric, namespace string, instrumentationLibName string, config *Config) (cwMetrics []*CWMetrics) {
206-
var dps DataPoints
207-
208206
if metric == nil {
209207
return
210208
}
@@ -217,6 +215,7 @@ func getCWMetrics(metric *pdata.Metric, namespace string, instrumentationLibName
217215
metricSlice := []map[string]string{metricMeasure}
218216

219217
// Retrieve data points
218+
var dps DataPoints
220219
switch metric.DataType() {
221220
case pdata.MetricDataTypeIntGauge:
222221
dps = IntDataPointSlice{metric.IntGauge().DataPoints()}

0 commit comments

Comments
 (0)