Enhance GET _node/stats/pipelines API for Metricbeat monitoring#10576
Enhance GET _node/stats/pipelines API for Metricbeat monitoring#10576cachedout merged 43 commits intoelastic:masterfrom
Conversation
|
@cachedout Looks like this PR now needs a merge/rebase from |
author Guy Boertje <guy@elastic.co> 1556806171 +0100 committer Mike Place <mike.place@elastic.co> 1557234770 +0200 Bump JrJackson to 0.4.8 Fixes elastic#10748 LIR serializer refactor Remove commented code Remove more commented code Remove license and add encoding Style change to make code more vertical. eid and hash Use pipelines_info to construct the stats Add tests for new fields Add queue stats
|
@jsvd and @yaauie I believe the only remaining test failure is unrelated to this PR so I consider it ready for review. @ycombinator is currently doing some functional testing on it as well. |
|
Hi @cachedout, I noticed a few things after running this PR:
|
|
@cachedout I pulled down this PR and re-tested it. Looks like points 1 and 2 from my previous comment have been addressed but point 3 hasn't yet. [EDIT] Please let me know if you plan to address it in this PR or a follow up PR. |
|
@ycombinator Sorry for the confusion. I was going to address the third point in a follow-up PR. |
ycombinator
left a comment
There was a problem hiding this comment.
Thanks @cachedout. In that case, this PR LGTM functionally.
|
@danhermann By "tech debt" are you referring to this comment? |
Both that one and the earlier comment about tighter coupling than we would like between Logstash core and plugins. |
|
Hi @danhermann ! Forgive me, but I'm a bit confused by this:
The changes made by the commits in that PR do seem to be present in the master branch. For example, see the git blame here which seems to show these commits present in the master branch. Just in case, I tried creating a PR for but while the commits themselves apply cleanly, such a PR seems to result in no proposed changes to the files in the Logstash master branch. I'm not sure what I'm missing here so any help would be appreciated. :) Regarding the comments about tight coupling, my understanding is that those were resolved via the introduction of the PluginMetadata system which was merged here and subsequent use of the new system in my changes. Did I misunderstand the nature of the tight-coupling problem? If you could provide more specifics about the nature of this problem which remain unresolved, I'd be happy of course to try and resolve them. :) |
My apologies, @cachedout. I saw those changes first as a series of distinct commits in the 7.x branch and missed that they had been committed into master as a single, squashed commit (as we prefer).
Let me take another look at those and get back to you in a day or two if that's ok. |
yaauie
left a comment
There was a problem hiding this comment.
I think we're in a pretty good spot here.
I have left a comment about retaining the @api private comment on our helper method and repeated a suggestion to move the method declaration to below the public API methods.
Beyond that, everything is looking good.
yaauie
left a comment
There was a problem hiding this comment.
👍
LGTM. Thanks for all the work to wrangle this through, @cachedout
|
Thanks again for your help @yaauie. It's very much appreciated by me and the whole team. :) @ycombinator Just as an FYI, the backport to this is here: #10909 |
…tic#10576) * parent 8c5697c author Guy Boertje <guy@elastic.co> 1556806171 +0100 committer Mike Place <mike.place@elastic.co> 1557234770 +0200 Bump JrJackson to 0.4.8 Fixes elastic#10748 LIR serializer refactor Remove commented code Remove more commented code Remove license and add encoding Style change to make code more vertical. eid and hash Use pipelines_info to construct the stats Add tests for new fields Add queue stats * bad merge resolution * bad merge resolution * Don't merge if nil * Better merge strategy * add vertex gate * Guard against nil * Use extended queue stats in pipeline report * Add cluster uuids to Elasticsearch outputters in pipeline output * move uuid * remove old uuid lookup * Only populate cluster_uuids when present * remove print * cluster_uuids -> cluster_uuid * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Make var singular * Match singular var name * Remove unnecessary nil check * Pass in the matching pipeline for the report * Remove old way of inserting cluster_uuids * Update logstash-core/lib/logstash/api/commands/stats.rb I like this much better and in testing it seems to work correctly. Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Remove unreferenced code that was part of debugging * Remove events var which was unused * Don't try to remove before insert * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Make pipeline extended stats generation more efficient * Implement suggestion to improve readability * Cleaner merging per review recommendation * Only generate extended_stats once * remove unneeded comments * Add cluster_uuid to node vertex * remove top-level cluster_uuids * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Implement change to make logic more simple suggested in review * Rely on options gate to insert graph Resolves concern here: elastic#10576 (comment) * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Move UUID lookup to API layer * Move private method to bottom per review recommandation
…) (#10909) * parent 8c5697c author Guy Boertje <guy@elastic.co> 1556806171 +0100 committer Mike Place <mike.place@elastic.co> 1557234770 +0200 Bump JrJackson to 0.4.8 Fixes #10748 LIR serializer refactor Remove commented code Remove more commented code Remove license and add encoding Style change to make code more vertical. eid and hash Use pipelines_info to construct the stats Add tests for new fields Add queue stats * bad merge resolution * bad merge resolution * Don't merge if nil * Better merge strategy * add vertex gate * Guard against nil * Use extended queue stats in pipeline report * Add cluster uuids to Elasticsearch outputters in pipeline output * move uuid * remove old uuid lookup * Only populate cluster_uuids when present * remove print * cluster_uuids -> cluster_uuid * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Make var singular * Match singular var name * Remove unnecessary nil check * Pass in the matching pipeline for the report * Remove old way of inserting cluster_uuids * Update logstash-core/lib/logstash/api/commands/stats.rb I like this much better and in testing it seems to work correctly. Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Remove unreferenced code that was part of debugging * Remove events var which was unused * Don't try to remove before insert * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Make pipeline extended stats generation more efficient * Implement suggestion to improve readability * Cleaner merging per review recommendation * Only generate extended_stats once * remove unneeded comments * Add cluster_uuid to node vertex * remove top-level cluster_uuids * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Implement change to make logic more simple suggested in review * Rely on options gate to insert graph Resolves concern here: #10576 (comment) * Update logstash-core/lib/logstash/api/commands/stats.rb Co-Authored-By: Ry Biesemeyer <yaauie@users.noreply.github.com> * Move UUID lookup to API layer * Move private method to bottom per review recommandation
…s for _node/stats Avoid to reassing the subdocument for queue metrics preferring a merge With PR elastic#10576 the PluginsStats.report(stats) overwrites the subsection related to queue instead of merge with newly created entries.
…s for _node/stats Avoid to reassing the subdocument for queue metrics preferring a merge With PR elastic#10576 the PluginsStats.report(stats) overwrites the subsection related to queue instead of merge with newly created entries.
…s for _node/stats Avoid to reassing the subdocument for queue metrics preferring a merge With PR elastic#10576 the PluginsStats.report(stats) overwrites the subsection related to queue instead of merge with newly created entries.
…s for _node/stats Avoid to reassing the subdocument for queue metrics preferring a merge With PR elastic#10576 the PluginsStats.report(stats) overwrites the subsection related to queue instead of merge with newly created entries.
…s for _node/stats Avoid to reassing the subdocument for queue metrics preferring a merge With PR #10576 the PluginsStats.report(stats) overwrites the subsection related to queue instead of merge with newly created entries.
Closes #10120
This will fail tests until #10561 is merged in and this PR is rebased. I'm just parking it here until then. ;)