Skip to content
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

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Apr 18, 2019

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.

ModuleFields: common.MapStr{
"broker": evtBroker,
"topic": evtTopic,
},
MetricSetFields: event,
})
if !sent {
return errors.New("metricset is closed")
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@exekias I think you are correct: #11666

Copy link
Contributor Author

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.

Copy link
Member

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.

@fearful-symmetry fearful-symmetry merged commit 40257fb into elastic:master Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Metricbeat Metricbeat Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants