-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Metricbeat] Migrate MongoDB dbstats Metricset to use ReporterV2 interface #10852
[Metricbeat] Migrate MongoDB dbstats Metricset to use ReporterV2 interface #10852
Conversation
Error seems unrelated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a suggestion and a question.
continue | ||
} | ||
data, _ := schema.Apply(result) | ||
events = append(events, data) | ||
reporter.Event(mb.Event{MetricSetFields: data}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Result of reporter.Event()
could be checked here to avoid continuing doing queries when the metricset is being stopped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the same concerns than here. I really don't have a strong opinion anyways but I think it's good that we reach consensus for this in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we already had some kind of consensus 🙂 but as replied in the other PR I don't see this as such a big deal, so as you prefer.
continue | ||
} | ||
data, _ := schema.Apply(result) | ||
events = append(events, data) | ||
if reported := reporter.Event(mb.Event{MetricSetFields: data}); !reported { | ||
logger.Error("error reporting event") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice that this is not an error, this is expected to happen when modules are stopped and we should not alert the user because of that.
In other places we are logging this at the debug level, and just in case we have to investigate something weird around this.
Error in ES module seems unrelated, merging |
Refer to #10774 for more info