[Metricbeat] Force metricsets to implement a Close()? #11266
Labels
discuss
Issue needs further discussion.
Metricbeat
Metricbeat
Team:Integrations
Label for the Integrations team
Summarizing some discussions I had with @kaiyan-sheng and @ruflin
Right now metricbeat provides a
Closer
interface that metricsets can implement. However, not all metricsets need aClose()
obviously. However, I'm beginning to wonder if some things slipped under the radar. I can't find where the docker/container metricset closes it's client handler, for example:beats/metricbeat/module/docker/container/container.go
Line 54 in 9fb274a
We have something like 155 metricsets, and it's easy for this kinda thing to slip unnoticed. I wonder if we should make
Close()
part of the ReporterV2 interface, and metricsets that don't need it can simply no op it. This may result in some extra code, but it could aid in auditing and consistency across the metricsets. Thoughts? Opinions?The text was updated successfully, but these errors were encountered: