-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Profiling,Infra,APM] Disable Profiling integration by default (#175201)
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: * 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]>
- Loading branch information
1 parent
6ca8cfb
commit abd3515
Showing
13 changed files
with
103 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
x-pack/plugins/apm/public/hooks/use_profiling_integration_setting.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { useUiSetting } from '@kbn/kibana-react-plugin/public'; | ||
import { apmEnableProfilingIntegration } from '@kbn/observability-plugin/common'; | ||
import { ApmFeatureFlagName } from '../../common/apm_feature_flags'; | ||
import { useApmFeatureFlag } from './use_apm_feature_flag'; | ||
|
||
export function useProfilingIntegrationSetting() { | ||
const isProfilingIntegrationFeatureFlagEnabled = useApmFeatureFlag( | ||
ApmFeatureFlagName.ProfilingIntegrationAvailable | ||
); | ||
const isProfilingIntegrationUiSettingEnabled = useUiSetting<boolean>( | ||
apmEnableProfilingIntegration | ||
); | ||
|
||
return ( | ||
isProfilingIntegrationFeatureFlagEnabled && | ||
isProfilingIntegrationUiSettingEnabled | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters