diff --git a/receiver/kubeletstatsreceiver/kubelet/utils.go b/receiver/kubeletstatsreceiver/kubelet/utils.go index 414336b58a5b..5cc7bee6b57c 100644 --- a/receiver/kubeletstatsreceiver/kubelet/utils.go +++ b/receiver/kubeletstatsreceiver/kubelet/utils.go @@ -59,5 +59,7 @@ func labels(labels map[string]string, descriptions map[string]string) ( } func applyLabels(metric *metricspb.Metric, attrs map[string]string) { - metric.MetricDescriptor.LabelKeys, metric.Timeseries[0].LabelValues = labels(attrs, nil) + if metric != nil { + metric.MetricDescriptor.LabelKeys, metric.Timeseries[0].LabelValues = labels(attrs, nil) + } }