Skip to content

Commit

Permalink
updated metrics.Close() logic to help with tests failing
Browse files Browse the repository at this point in the history
  • Loading branch information
ShourieG committed Nov 6, 2024
1 parent 1a519f0 commit a16a176
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions x-pack/filebeat/input/gcs/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,12 @@ func newInputMetrics(id string, optionalParent *monitoring.Registry) *inputMetri
Register("histogram", metrics.NewHistogram(out.sourceLagTime)) //nolint:errcheck // A unique namespace is used so name collisions are impossible.

// set the URL of the input resource. Id is the bucket name.
if id != "" {
out.url.Set("gs://" + id)
}
out.url.Set("gs://" + id)

return out
}

func (m *inputMetrics) Close() {
m.url.Clear()
m.unregister()
}

0 comments on commit a16a176

Please sign in to comment.