-
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,Infra,APM] Disable Profiling integration by default #175201
[Profiling,Infra,APM] Disable Profiling integration by default #175201
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
da815e5
to
f4df01e
Compare
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
/ci |
f4df01e
to
b8449e7
Compare
@@ -213,6 +213,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { | |||
'xpack.apm.featureFlags.migrationToFleetAvailable (any)', | |||
'xpack.apm.featureFlags.sourcemapApiAvailable (any)', | |||
'xpack.apm.featureFlags.storageExplorerAvailable (any)', | |||
'xpack.apm.featureFlags.profilingIntegrationAvailable (any)', |
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.
Can we specify 'boolean' here due to the strict schema?
kibana/x-pack/plugins/apm/server/index.ts
Line 80 in b8449e7
profilingIntegrationAvailable: schema.boolean({ defaultValue: false }), |
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 point, done ✅
…rofiling-integration
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 checked locally with the provided steps and it works as described. I have one question: Should we have the option to enable profiling in the settings if the xpack.profiling.enabled: true
and the flags are not set in the kibana.yml
? I find it a bit odd to have the option in the settings and for example to disable the profiling there and then to remove the flags from the config and the option to enable it disappears 🤔
profiling_settingd.mov
I think the expected behavior will be to always have the flags in the settings and only the value to change (with false
as a default option) Wdyt?
The things is, if we keep the toggle in Settings while the plugin is disabled, the toggle would have no effect regardless of it's state, because the plugin configuration takes precedence. That's why I decided to hide the toggle altogether if the feature flag is off to not confuse users that might expect something to happen if they toggle it on. Does this makes sense or I'm missing something? |
@elasticmachine merge upstream |
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.
The things is, if we keep the toggle in Settings while the plugin is disabled, the toggle would have no effect regardless of it's state, because the plugin configuration takes precedence. That's why I decided to hide the toggle altogether if the feature flag is off to not confuse users that might expect something to happen if they toggle it on.
That makes sense, thanks for explaining!
I found the behavior confusing only in the case when setting it to off in the settings and then if the plugin feature flag is removed from the config and then set to true again it will still be off (because the settings config will be the one used even if it's enabled in the kibana.yml file after it is set to false in the settings)- that's probably an edge case and not likely to happen.
But overall it works fine, thanks for the fixes :)
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.
Kibana Security changes LGTM
@elasticmachine merge upstream |
…mykolaharmash/kibana into 175016-cloud-only-profiling-integration
…rofiling-integration
Ah, now I see what you mean, thank you for clarifying. But I agree that this would be rather an edge-case and I hope if that happens user would remember to check the ui setting when they re-enable the plugin flag because at some point they've toggled it off and at least should be aware that it exists 🤞 |
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ic#175201) Closes elastic#175016 ## Summary This PR disables the Profiling integration in Infra and APM by default on the plugin configuration level because this integration require users to first configure the main `profiling` plugin. On-prem users will have to manually enable both integrations once they enabled the Universal Profiling for their hosts. Cloud users will have Infra and APM integrations enabled by default because on Cloud instances Universal Profiling is already configured. A PR for the default Cloud settings will follow after this one is merged. Changes I've made: * Disabled the Infra integration be default * Introduced a new APM feature flag for the Profiling integration * Made sure all the places in APM that rely on Profiling integration respect the new feature flag * Fixed a bug in APM when Universal Profiling was shown even though the integration was disabled in UI settings https://github.com/elastic/kibana/assets/793851/65dfbb5b-1850-4d18-a92a-6ad59e0436a3 ## How To Test 1. Checkout locally 2. Make sure you don't have `xpack.infra.featureFlags.profilingEnabled` already enabled in `kibana.yml` 3. Open kibana and make sure you don't see "Universal Profiling" tab in Host and Service details 4. Enabled both flags in `kibana.yml`: `xpack.infra.featureFlags.profilingEnabled` and `xpack.apm.featureFlags.profilingIntegrationAvailable: true` 5. Check that now you see "Universal Profiling" tab in the details screens in both Infra and APM 6. Go to Infra settings view and disable the Profiling integration, make sure the tab disappears 7. 6. Go to APM settings view and disable the Profiling integration, make sure the tab disappears --------- Co-authored-by: Kibana Machine <[email protected]> (cherry picked from commit abd3515) # Conflicts: # x-pack/plugins/apm/public/components/app/settings/general_settings/index.tsx # x-pack/plugins/apm/public/components/shared/transaction_action_menu/transaction_action_menu.test.tsx
…#175201) (#176406) # Backport This will backport the following commits from `main` to `8.12`: - [[Profiling,Infra,APM] Disable Profiling integration by default (#175201)](#175201) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Mykola Harmash","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-24T11:44:26Z","message":"[Profiling,Infra,APM] Disable Profiling integration by default (#175201)\n\nCloses https://github.com/elastic/kibana/issues/175016\r\n\r\n## Summary\r\n\r\nThis PR disables the Profiling integration in Infra and APM by default\r\non the plugin configuration level because this integration require users\r\nto first configure the main `profiling` plugin. On-prem users will have\r\nto manually enable both integrations once they enabled the Universal\r\nProfiling for their hosts. Cloud users will have Infra and APM\r\nintegrations enabled by default because on Cloud instances Universal\r\nProfiling is already configured. A PR for the default Cloud settings\r\nwill follow after this one is merged.\r\n\r\nChanges I've made:\r\n* Disabled the Infra integration be default\r\n* Introduced a new APM feature flag for the Profiling integration\r\n* Made sure all the places in APM that rely on Profiling integration\r\nrespect the new feature flag\r\n* Fixed a bug in APM when Universal Profiling was shown even though the\r\nintegration was disabled in UI settings\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/793851/65dfbb5b-1850-4d18-a92a-6ad59e0436a3\r\n\r\n## How To Test\r\n\r\n1. Checkout locally\r\n2. Make sure you don't have `xpack.infra.featureFlags.profilingEnabled`\r\nalready enabled in `kibana.yml`\r\n3. Open kibana and make sure you don't see \"Universal Profiling\" tab in\r\nHost and Service details\r\n4. Enabled both flags in `kibana.yml`:\r\n`xpack.infra.featureFlags.profilingEnabled` and\r\n`xpack.apm.featureFlags.profilingIntegrationAvailable: true`\r\n5. Check that now you see \"Universal Profiling\" tab in the details\r\nscreens in both Infra and APM\r\n6. Go to Infra settings view and disable the Profiling integration, make\r\nsure the tab disappears\r\n7. 6. Go to APM settings view and disable the Profiling integration,\r\nmake sure the tab disappears\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"abd3515dda40d48bd0c59f7d2861ffa86db133c1","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport missing","Team:obs-ux-infra_services","v8.12.1","v8.13.0"],"number":175201,"url":"https://github.com/elastic/kibana/pull/175201","mergeCommit":{"message":"[Profiling,Infra,APM] Disable Profiling integration by default (#175201)\n\nCloses https://github.com/elastic/kibana/issues/175016\r\n\r\n## Summary\r\n\r\nThis PR disables the Profiling integration in Infra and APM by default\r\non the plugin configuration level because this integration require users\r\nto first configure the main `profiling` plugin. On-prem users will have\r\nto manually enable both integrations once they enabled the Universal\r\nProfiling for their hosts. Cloud users will have Infra and APM\r\nintegrations enabled by default because on Cloud instances Universal\r\nProfiling is already configured. A PR for the default Cloud settings\r\nwill follow after this one is merged.\r\n\r\nChanges I've made:\r\n* Disabled the Infra integration be default\r\n* Introduced a new APM feature flag for the Profiling integration\r\n* Made sure all the places in APM that rely on Profiling integration\r\nrespect the new feature flag\r\n* Fixed a bug in APM when Universal Profiling was shown even though the\r\nintegration was disabled in UI settings\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/793851/65dfbb5b-1850-4d18-a92a-6ad59e0436a3\r\n\r\n## How To Test\r\n\r\n1. Checkout locally\r\n2. Make sure you don't have `xpack.infra.featureFlags.profilingEnabled`\r\nalready enabled in `kibana.yml`\r\n3. Open kibana and make sure you don't see \"Universal Profiling\" tab in\r\nHost and Service details\r\n4. Enabled both flags in `kibana.yml`:\r\n`xpack.infra.featureFlags.profilingEnabled` and\r\n`xpack.apm.featureFlags.profilingIntegrationAvailable: true`\r\n5. Check that now you see \"Universal Profiling\" tab in the details\r\nscreens in both Infra and APM\r\n6. Go to Infra settings view and disable the Profiling integration, make\r\nsure the tab disappears\r\n7. 6. Go to APM settings view and disable the Profiling integration,\r\nmake sure the tab disappears\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"abd3515dda40d48bd0c59f7d2861ffa86db133c1"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/175201","number":175201,"mergeCommit":{"message":"[Profiling,Infra,APM] Disable Profiling integration by default (#175201)\n\nCloses https://github.com/elastic/kibana/issues/175016\r\n\r\n## Summary\r\n\r\nThis PR disables the Profiling integration in Infra and APM by default\r\non the plugin configuration level because this integration require users\r\nto first configure the main `profiling` plugin. On-prem users will have\r\nto manually enable both integrations once they enabled the Universal\r\nProfiling for their hosts. Cloud users will have Infra and APM\r\nintegrations enabled by default because on Cloud instances Universal\r\nProfiling is already configured. A PR for the default Cloud settings\r\nwill follow after this one is merged.\r\n\r\nChanges I've made:\r\n* Disabled the Infra integration be default\r\n* Introduced a new APM feature flag for the Profiling integration\r\n* Made sure all the places in APM that rely on Profiling integration\r\nrespect the new feature flag\r\n* Fixed a bug in APM when Universal Profiling was shown even though the\r\nintegration was disabled in UI settings\r\n\r\n\r\nhttps://github.com/elastic/kibana/assets/793851/65dfbb5b-1850-4d18-a92a-6ad59e0436a3\r\n\r\n## How To Test\r\n\r\n1. Checkout locally\r\n2. Make sure you don't have `xpack.infra.featureFlags.profilingEnabled`\r\nalready enabled in `kibana.yml`\r\n3. Open kibana and make sure you don't see \"Universal Profiling\" tab in\r\nHost and Service details\r\n4. Enabled both flags in `kibana.yml`:\r\n`xpack.infra.featureFlags.profilingEnabled` and\r\n`xpack.apm.featureFlags.profilingIntegrationAvailable: true`\r\n5. Check that now you see \"Universal Profiling\" tab in the details\r\nscreens in both Infra and APM\r\n6. Go to Infra settings view and disable the Profiling integration, make\r\nsure the tab disappears\r\n7. 6. Go to APM settings view and disable the Profiling integration,\r\nmake sure the tab disappears\r\n\r\n---------\r\n\r\nCo-authored-by: Kibana Machine <[email protected]>","sha":"abd3515dda40d48bd0c59f7d2861ffa86db133c1"}}]}] BACKPORT-->
…ic#175201) Closes elastic#175016 ## Summary This PR disables the Profiling integration in Infra and APM by default on the plugin configuration level because this integration require users to first configure the main `profiling` plugin. On-prem users will have to manually enable both integrations once they enabled the Universal Profiling for their hosts. Cloud users will have Infra and APM integrations enabled by default because on Cloud instances Universal Profiling is already configured. A PR for the default Cloud settings will follow after this one is merged. Changes I've made: * Disabled the Infra integration be default * Introduced a new APM feature flag for the Profiling integration * Made sure all the places in APM that rely on Profiling integration respect the new feature flag * Fixed a bug in APM when Universal Profiling was shown even though the integration was disabled in UI settings https://github.com/elastic/kibana/assets/793851/65dfbb5b-1850-4d18-a92a-6ad59e0436a3 ## How To Test 1. Checkout locally 2. Make sure you don't have `xpack.infra.featureFlags.profilingEnabled` already enabled in `kibana.yml` 3. Open kibana and make sure you don't see "Universal Profiling" tab in Host and Service details 4. Enabled both flags in `kibana.yml`: `xpack.infra.featureFlags.profilingEnabled` and `xpack.apm.featureFlags.profilingIntegrationAvailable: true` 5. Check that now you see "Universal Profiling" tab in the details screens in both Infra and APM 6. Go to Infra settings view and disable the Profiling integration, make sure the tab disappears 7. 6. Go to APM settings view and disable the Profiling integration, make sure the tab disappears --------- Co-authored-by: Kibana Machine <[email protected]>
Closes #175016
Summary
This PR disables the Profiling integration in Infra and APM by default on the plugin configuration level because this integration require users to first configure the main
profiling
plugin. On-prem users will have to manually enable both integrations once they enabled the Universal Profiling for their hosts. Cloud users will have Infra and APM integrations enabled by default because on Cloud instances Universal Profiling is already configured. A PR for the default Cloud settings will follow after this one is merged.Changes I've made:
CleanShot.2024-01-22.at.13.31.40.mp4
How To Test
xpack.infra.featureFlags.profilingEnabled
already enabled inkibana.yml
kibana.yml
:xpack.infra.featureFlags.profilingEnabled
andxpack.apm.featureFlags.profilingIntegrationAvailable: true