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

Commit

Permalink
Fix incorrect slice creation (#196)
Browse files Browse the repository at this point in the history
* Added mapping for kubernetes pod resource

* Add mapping for k8s node resource

* Extend k8s node test

* Fix incorrect slice creation
  • Loading branch information
olagacek authored and bogdandrutu committed Sep 2, 2019
1 parent 3b40441 commit 321e549
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics_proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (se *statsExporter) protoMetricToTimeSeries(ctx context.Context, mappedRsc
metricType := se.metricTypeFromProto(metricName)
metricLabelKeys := metric.GetMetricDescriptor().GetLabelKeys()
metricKind, valueType := protoMetricDescriptorTypeToMetricKind(metric)
labelKeys := make([]string, len(metricLabelKeys))
labelKeys := make([]string, 0, len(metricLabelKeys))
for _, key := range metricLabelKeys {
labelKeys = append(labelKeys, sanitize(key.GetKey()))
}
Expand Down

0 comments on commit 321e549

Please sign in to comment.