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

[Profling] Single-click setup from Kibana #148959

Merged
merged 76 commits into from Feb 7, 2023

Conversation

dgieselaar
Copy link
Member

@dgieselaar dgieselaar commented Jan 16, 2023

Closes https://github.com/elastic/prodfiler/issues/2884.

To test, go to the Profiling app in Kibana. A request to the Kibana server should be triggerend (GET /internal/profiling/v1/setup/es_resources. The response should be a 200 and look similar to this:

{
  "has_setup": false,
  "steps": [
    {
      "name": "apm_package",
      "completed": true
    },
    {
      "name": "cluster_settings",
      "completed": true
    },
    {
      "name": "ilm",
      "completed": true
    },
    {
      "name": "component_templates",
      "completed": true
    },
    {
      "name": "index_templates",
      "completed": true
    },
    {
      "name": "create_events_data_streams",
      "completed": false
    },
    {
      "name": "create_indices",
      "completed": true
    },
    {
      "name": "security",
      "completed": true
    }
  ]
}

After clicking "Setup universal profiling", a HTTP POST request to /internal/profiling/v1/setup/es_resources should be triggered. After this request has successfully completed, another GET request to /internal/profiling/v1/setup/es_resources is triggered. If this successfully completes, the Profiling UI should be displayed.

To test this locally, add the following to kibana.dev.yml:

xpack.cloud.id: "foo"
xpack.fleet.packages:
  - name: apm
    version: latest

xpack.fleet.agentPolicies:
  - name: Elastic APM
    id: policy-elastic-agent-on-cloud
    package_policies:
      - name: Elastic APM
        id: elastic-cloud-apm
        package:
          name: apm
        inputs:
          - type: apm
            keep_enabled: true
            vars:
              - name: api_key_enabled
                value: true
              - name: host
                value: "0.0.0.0:8200"
                frozen: true
              - name: secret_token
                value: "foo"

This will install the APM package and a policy that looks like the Elastic Cloud APM policy.

inge4pres and others added 30 commits January 12, 2023 18:19
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Provide installation of Universal Profiling:
 * component templates
 * cluster settings (max_bucket)
 * ilm policy
 * index templates

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Provide installation of Universal Profiling:
 * component templates
 * cluster settings (max_bucket)
 * ilm policy
 * index templates

Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
@inge4pres inge4pres requested a review from a team as a code owner February 6, 2023 14:44
@inge4pres inge4pres force-pushed the profiling/init-and-setup-data branch 2 times, most recently from c4823f4 to 5be2048 Compare February 6, 2023 16:08
@inge4pres inge4pres self-assigned this Feb 6, 2023
inge4pres and others added 7 commits February 6, 2023 17:40
@inge4pres inge4pres force-pushed the profiling/init-and-setup-data branch from 5be2048 to 1802163 Compare February 6, 2023 16:40
@dgieselaar dgieselaar removed ci:build-cloud-image ci:cloud-deploy Create or update a Cloud deployment ci:cloud-redeploy Always create a new Cloud deployment labels Feb 7, 2023
@dgieselaar dgieselaar enabled auto-merge (squash) February 7, 2023 12:09
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
profiling 115 119 +4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
profiling 240.4KB 250.9KB +10.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
profiling 13.2KB 13.6KB +386.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @inge4pres

@dgieselaar dgieselaar merged commit 807b402 into elastic:main Feb 7, 2023
@kibanamachine kibanamachine added v8.7.0 backport:skip This commit does not require backporting labels Feb 7, 2023
benakansara pushed a commit to benakansara/kibana that referenced this pull request Feb 7, 2023
Co-authored-by: inge4pres <francesco.gualazzi@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Rühsen <tim.ruehsen@gmx.de>
Co-authored-by: Francesco Gualazzi <inge4pres@users.noreply.github.com>
Closes elastic/prodfiler#2884
@KOTungseth KOTungseth added the Team:APM All issues that need APM UI Team support label Feb 8, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:enhancement Team:APM All issues that need APM UI Team support v8.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants