-
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 kafka to reporterV2 with error return #11868
[metricbeat] migrate kafka to reporterV2 with error return #11868
Conversation
ModuleFields: common.MapStr{ | ||
"broker": evtBroker, | ||
"topic": evtTopic, | ||
}, | ||
MetricSetFields: event, | ||
}) | ||
if !sent { | ||
return errors.New("metricset is closed") |
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.
Should we report an error here? I understood this is false
when the metricset is stopped, which is not an error but a known condition
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.
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.
Yah. In theory you don't need to return an error, but for whatever reason return nil
just seemed...weird here.
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.
We should return nil
here, yes. If you want you can log something like "Fetch interrupted, metricset stopping" at the debug level.
see #11374
For whatever reason, I couldn't get the integration tests working on OSX. Took me a while to get a proper beats env setup on my linux box.