Skip to content

Commit

Permalink
[processor/k8sattributes]: log error encountered during kube client i…
Browse files Browse the repository at this point in the history
…nitialisation

Signed-off-by: Florian Bacher <[email protected]>
  • Loading branch information
bacherfl committed Nov 14, 2024
1 parent c06be6d commit bab209f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions processor/k8sattributesprocessor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit bab209f

Please sign in to comment.