Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 321e549

Browse files
olagacekbogdandrutu
authored andcommitted
Fix incorrect slice creation (#196)
* Added mapping for kubernetes pod resource * Add mapping for k8s node resource * Extend k8s node test * Fix incorrect slice creation
1 parent 3b40441 commit 321e549

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

metrics_proto.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func (se *statsExporter) protoMetricToTimeSeries(ctx context.Context, mappedRsc
243243
metricType := se.metricTypeFromProto(metricName)
244244
metricLabelKeys := metric.GetMetricDescriptor().GetLabelKeys()
245245
metricKind, valueType := protoMetricDescriptorTypeToMetricKind(metric)
246-
labelKeys := make([]string, len(metricLabelKeys))
246+
labelKeys := make([]string, 0, len(metricLabelKeys))
247247
for _, key := range metricLabelKeys {
248248
labelKeys = append(labelKeys, sanitize(key.GetKey()))
249249
}

0 commit comments

Comments
 (0)