-
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 Ceph osd_tree to use ReporterV2 interface #11048
[Metricbeat] Migrate Ceph osd_tree to use ReporterV2 interface #11048
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
jenkins, test this please |
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.
Overall looks good, just one single change is needed to merge PR. Everything else in comments are minor.
@@ -36,6 +36,8 @@ var ( | |||
}.Build() | |||
) | |||
|
|||
var logger = logp.NewLogger("ceph.osd_tree") |
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.
If you rebase to master, you can remove this line
content, err := m.HTTP.FetchContent() | ||
if err != nil { | ||
return nil, err | ||
logger.Error(err) |
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.
If you rebase to master, you can use m.Logger().Error(err)
here instead
} | ||
|
||
events, err := eventsMapping(content) | ||
if err != nil { | ||
return nil, err | ||
logger.Error(err) |
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.
If you rebase to master, you can use m.Logger().Error(err)
here instead
err := mbtest.WriteEvents(f, t) | ||
if err != nil { | ||
f := mbtest.NewReportingMetricSetV2(t, getConfig()) | ||
events, errs := mbtest.ReportingFetchV2(f) |
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.
Again, this is the only critical change needed here. Check my comments here to avoid a flaky test
388b053
to
65c4dbb
Compare
Thanks for your review. I believe I've addressed all the feedback now. |
jenkins, test this |
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.
Good work!
Refer to #10774 for more info