Skip to content

[metricbeat] migrate kafka to reporterV2 with error return#11868

Merged
fearful-symmetry merged 3 commits intoelastic:masterfrom
fearful-symmetry:migration/mb/reporterv2error/kafka
Apr 24, 2019
Merged

[metricbeat] migrate kafka to reporterV2 with error return#11868
fearful-symmetry merged 3 commits intoelastic:masterfrom
fearful-symmetry:migration/mb/reporterv2error/kafka

Conversation

@fearful-symmetry
Copy link
Copy Markdown
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.

MetricSetFields: event,
})
if !sent {
return errors.New("metricset is closed")
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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