-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Profiling] Profiling data access plugin #165198
[Profiling] Profiling data access plugin #165198
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
…es/kibana into profiling-data-access-plugin
One (rather general) question: @danielmitterdorfer and me had discussed whether the Flamegraph generation doesn't need to migrate entirely into the ES plugin -- that shouldn't stop us from this PR, but it may be something to keep in mind, design-wise. |
@thomasdullien I talked about that with @danielmitterdorfer last week. I'll check what kind of data processing we're still doing on kibana server side. Then we can check if that makes sense or not to move it to the ES plugin. |
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.
A few questions for clarification:
- who do we expect to use the new
profiling-data-access
plugin? - do we expect the new plugin to be used in Kibana server, Kibana UI, or both? (relevant since there may be NodeJS-specific APIs used in the migrated code)
When reviewing, I realized that there were several deprecated methods still in use so I created #165282 to remove them. This could help reduce the size of the PR.
I also should note that flamegraph creation is spread out across Kibana server and UI for performance reasons, so the new plugin will not yet present a clean abstraction for other users besides profiling. Subsequent work will likely move the entire flamegraph creation pipeline into Elasticsearch so this is probably only a short-term concern.
Every plugin that wants to have profiling data including the Profiling plugin itself.
Only Kibana server. This plugin exists exclusively to externalize Profiling data.
There are two points here:
|
I also had a look at the code and I'm under the impression that the majority of the changes here makes sense regardless whether we move flamegraph processing into ES or not. Even then it's useful to keep both options (processing in Kibana and ES) for a short period of time both as risk mitigation as well as for easier comparison of how the move to Elasticsearch affects performance. |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: |
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.
Looks good and is working as expected when I tried it out. 👍
I have one architectural thought about clearer boundaries. As we move more things into the access plugin, we should think about the interface we expose via the plugin. At this time a user can directly or indirectly get data from Elasticsearch via ProfilingESClient
, registered services, or exported functions. If we can standardize or simplify this, it would give us consistency and a reduced interface footprint (good for letting us change things as needed).
Of course I realize we're still in flux and have yet to work out how non-profiling clients will want to use the new plugin, which is why this is just general feedback and not requirements. :)
This is part 1 of a series of PRs to expose the flamegraph to be used by other plugins.
The problem
Currently for plugin-A to show data from plugin-B, it needs to add dependency on plugin-B. If plugin-B wants to show data from plugin-A, it also needs to add plugin-A as a dependency, and here is where the problem happens. In such scenario, we have a cyclic dependency problem.
The solution
To solve this problem a new plugin is created,
profiling-data-access
. This plugin exposes services that consumer plugins can call in other to have the data they need to show on their end. Theprofiling
plugin is also using this new plugin. For now, only the flamegraph service is available, The idea is to slowly migrate the data fetching from profiling to this new plugin in other to facilitate the integration across plugins.Why some many files?
As I said, only the flamegraph logic was moved to the new plugin, but it has many files that it needs to properly build the response of the service call. I moved all these files to the
common
folder inside the new plugin and adjusted the imports in the profiling plugin.