Skip to content

[metricbeat] migrate kvm to ReporterV2 with new error handling #11814

Merged
fearful-symmetry merged 4 commits intoelastic:masterfrom
fearful-symmetry:migration/mb/reporterv2error/kvm
Apr 15, 2019
Merged

[metricbeat] migrate kvm to ReporterV2 with new error handling #11814
fearful-symmetry merged 4 commits intoelastic:masterfrom
fearful-symmetry:migration/mb/reporterv2error/kvm

Conversation

@fearful-symmetry
Copy link
Copy Markdown
Contributor

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

see #11374

A few changes here, adding a break statement to the loop and so on.

@fearful-symmetry fearful-symmetry added Metricbeat Metricbeat Team:Integrations Label for the Integrations team technical_debt labels Apr 15, 2019
@fearful-symmetry fearful-symmetry requested a review from a team April 15, 2019 00:52
@fearful-symmetry fearful-symmetry self-assigned this Apr 15, 2019
},
})
if !reported {
break
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.

this will go to the next domain, you probably want to return here?

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.

Ah yah, think you're right.

report.Error(errors.Wrap(err, "failed to disconnect"))
msg := errors.Wrap(err, "failed to disconnect")
report.Error(msg)
m.Logger().Error(msg)
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.

sorry I missed previous discussions and refactor. Was report.Error logging this message before?

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.

@ruflin 's thinking was that report-ed error messages and logged error messages get sent to different places & are consumed in different ways, so we should sent errors to both.

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.

Thanks for explaining, LGTM

@fearful-symmetry fearful-symmetry merged commit b3b9a2f into elastic:master Apr 15, 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.

3 participants