This came up during a discussion with @ruflin and he asked me to file an issue.
So, there's some inconsistency about how we handle the bool that gets returned from reporter.Event(). This will only return false if the metricset has closed.
The vast majority of metricsets ignore this, however a few check the value and log an error:
./ceph/cluster_disk/cluster_disk.go:77: if reported := reporter.Event(mb.Event{MetricSetFields: event}); !reported {
./mongodb/dbstats/dbstats.go:89: reported := reporter.Event(mb.Event{MetricSetFields: data})
./kubernetes/state_container/state_container.go:144: if reported := reporter.Event(mb.Event{
./kubernetes/state_replicaset/state_replicaset.go:116: if reported := reporter.Event(mb.Event{
./kubernetes/state_deployment/state_deployment.go:117: if reported := reporter.Event(mb.Event{
./kubernetes/state_statefulset/state_statefulset.go:115: if reported := reporter.Event(mb.Event{
How should we standardize and document this? A blurb in the beats developer docs would be helpful, at least.
This came up during a discussion with @ruflin and he asked me to file an issue.
So, there's some inconsistency about how we handle the
boolthat gets returned fromreporter.Event(). This will only return false if the metricset has closed.The vast majority of metricsets ignore this, however a few check the value and log an error:
How should we standardize and document this? A blurb in the beats developer docs would be helpful, at least.