-
Notifications
You must be signed in to change notification settings - Fork 25k
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] Divide into more packages #107201
[Profiling] Divide into more packages #107201
Conversation
With this commit we split the Universal Profiling plugin into three packages: * `persistence` contains everything w.r.t index management * `rest` contains the REST API * `action` contains the transport API The `action` / `rest` structure follows the already established structure in the rest of the code base. We divide this plugin into multiple packages mainly because the different functionalities will be maintained by different teams in the future. This restructuring helps clarify boundaries.
Pinging @elastic/obs-knowledge-team (Team:obs-knowledge) |
assertEquals(response.getTotalSamples(), 3L); | ||
|
||
return response; | ||
return new GetStackTracesResponse( |
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.
I did this because this would have required to make the internal builder class public. As this test focuses on the REST action, it is fine to just construct the response directly (as done in the other test method) and avoid adding a dependency on the builder class.
private final String namePrefix; | ||
private final int version; | ||
private final String generation; | ||
private final OnVersionBump onVersionBump; | ||
private final List<Migration> migrations; | ||
|
||
public static ProfilingIndex regular(String name, int version, OnVersionBump onVersionBump) { | ||
static ProfilingIndex regular(String name, int version, OnVersionBump onVersionBump) { |
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.
While we needed to declare the class itself public, there is no need for code outside the persistence
package to create new indices and hence we kept the factory methods package-private.
While the changeset appears large, it's almost entirely file renames and changed package name declarations. I have annotated the changes that I have considered non-obvious. |
With this commit we split the Universal Profiling plugin into three packages:
persistence
contains everything w.r.t index managementrest
contains the REST APIaction
contains the transport APIThe
action
/rest
structure follows the already established structure in the rest of the code base. We divide this plugin into multiple packages mainly because the different functionalities will be maintained by different teams in the future. This restructuring helps clarify boundaries.