From bab209f17eabb8e9d267abdec26659d83b74cc5a Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 14 Nov 2024 15:16:56 +0100 Subject: [PATCH] [processor/k8sattributes]: log error encountered during kube client initialisation Signed-off-by: Florian Bacher --- processor/k8sattributesprocessor/processor.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/processor/k8sattributesprocessor/processor.go b/processor/k8sattributesprocessor/processor.go index 5d63cbbd100a..2481cd8f9a54 100644 --- a/processor/k8sattributesprocessor/processor.go +++ b/processor/k8sattributesprocessor/processor.go @@ -59,6 +59,7 @@ func (kp *kubernetesprocessor) Start(_ context.Context, host component.Host) err for _, opt := range allOptions { if err := opt(kp); err != nil { + kp.logger.Error("Could not apply option", zap.Error(err)) componentstatus.ReportStatus(host, componentstatus.NewFatalErrorEvent(err)) return nil } @@ -68,6 +69,7 @@ func (kp *kubernetesprocessor) Start(_ context.Context, host component.Host) err if kp.kc == nil { err := kp.initKubeClient(kp.telemetrySettings, kubeClientProvider) if err != nil { + kp.logger.Error("Could not initialise kube client", zap.Error(err)) componentstatus.ReportStatus(host, componentstatus.NewFatalErrorEvent(err)) return nil }