From ecbae0dc13b912f181d235f2b613b803b8f173f1 Mon Sep 17 00:00:00 2001 From: Angelo Poerio Date: Mon, 14 Aug 2023 16:52:54 +0200 Subject: [PATCH] get servicename from daemonset if possible (#2013) * get servicename from daemonset if possible Signed-off-by: Angelo Poerio * added changelog Signed-off-by: Angelo Poerio --------- Signed-off-by: Angelo Poerio (cherry picked from commit 45581922cc8f81a5cc05883159cead9b8e77d575) --- pkg/instrumentation/sdk.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/instrumentation/sdk.go b/pkg/instrumentation/sdk.go index 5d6c33f25..883b7a31f 100644 --- a/pkg/instrumentation/sdk.go +++ b/pkg/instrumentation/sdk.go @@ -219,6 +219,9 @@ func chooseServiceName(pod corev1.Pod, resources map[string]string, index int) s if name := resources[string(semconv.K8SStatefulSetNameKey)]; name != "" { return name } + if name := resources[string(semconv.K8SDaemonSetNameKey)]; name != "" { + return name + } if name := resources[string(semconv.K8SJobNameKey)]; name != "" { return name }