From 025e137cc0970daa41041221ca8a9cfe417c7c4d Mon Sep 17 00:00:00 2001 From: Maurizio Branca Date: Thu, 16 May 2024 16:39:07 +0200 Subject: [PATCH] Remove erroneous error check --- x-pack/filebeat/input/azureeventhub/v1_input.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/x-pack/filebeat/input/azureeventhub/v1_input.go b/x-pack/filebeat/input/azureeventhub/v1_input.go index de52fc38e23..7ac2bb153aa 100644 --- a/x-pack/filebeat/input/azureeventhub/v1_input.go +++ b/x-pack/filebeat/input/azureeventhub/v1_input.go @@ -69,12 +69,8 @@ func (in *eventHubInputV1) Run( defer in.pipelineClient.Close() // Setup input metrics - inputMetrics := newInputMetrics(inputContext.ID, nil) - if err != nil { - return fmt.Errorf("failed to create input metrics: %w", err) - } - defer inputMetrics.Close() - in.metrics = inputMetrics + in.metrics = newInputMetrics(inputContext.ID, nil) + defer in.metrics.Close() ctx := v2.GoContextFromCanceler(inputContext.Cancelation)