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 golang module to ReporterV2 error #11382

Conversation

fearful-symmetry
Copy link
Contributor

@fearful-symmetry fearful-symmetry commented Mar 21, 2019

See #11374 and #10727

This was @ruflin and my idea, now that we have a "cleaner" error interface that could potentially remove some boilerplate from Fetch().

We also decided to do this on a module-by-module basis where possible, to avoid spamming with excessive PRs, as each change is rather small. However I'm not set on this, and we could do it metricset-by-metricset if people prefer.

@fearful-symmetry fearful-symmetry added Metricbeat Metricbeat Team:Integrations Label for the Integrations team technical_debt labels Mar 21, 2019
@fearful-symmetry fearful-symmetry requested review from ruflin and a team March 21, 2019 20:41
logger.Error(err)
reporter.Error(err)
return
return errors.Wrap(err, "Error in http fetch")
Copy link
Member

Choose a reason for hiding this comment

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

Nit: errors inside errors should start lower case. I wonder why Hound did not complain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oddly enough, the linter I have in vscode usually complains about that as well. Might be more context-dependent?

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.

2 participants