* Closes#72636. Adds alerting integration for APM transaction duration anomalies.
* Code review feedback
* Display alert summary with the selected anomaly severity label instead of the anomaly score.
* - refactored ALL_OPTION and NOT_DEFINED_OPTION to be shared from common/environment_filter_values
- utilize getEnvironmentLabel in the alerting trigger components and added support for the 'All' label
* refactor get_all_environments to minimize exports and be more consistent and clean
* - Reorg the alerts menu for different alert types (threshold/anomaly)
- default environment alert settings to the selected filter
* - Filters default transaction type to only those supported in the APM anomaly detection jobs
- Removes Service name and transaction type from the set of expressions in the alerting setup
* - remove bell icon from alerts menu
* Adds target service back into the anomaly alert setup as a ready-only expression
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [APM] Use licensing from context
We added the usage of `featureUsage.notifyUsage` from the licensing plugin in #69455.
This required us to use `getStartServices to add `licensing` to `context.plugins`.
In #69838 `featureUsage` was added to `context.licensing`, so we don't need to add it to `context.plugins`.
* Closes#68485 by:
- use the ML plugin to query for all APM jobs
- inspect the ml job groups to find all jobs related to a particular service
- use the mlAnomalySearch client to get ml job buckets with the max anomaly score
- query for the model_plot buckets to obtain actual/median values for the ML description
- return the relevant ML job with the max anomaly score for a service
- indicate to the user that no anomalies were found for a service with an ml job
* - Use the anomalyDetectorsProvider jobs API rather than the search endpoint directly
- Defines a specific return type for the ml jobs api
- Update the empty anomaly data message
* Code and types cleanup
* Return to using record result type on anomaly queries. These are the
same values used in the anomaly explorer and it includes actual &
typical values which greatly improve performance of the previous query.
* - If anomaly data is missing show a gray border around node
* - moved AnomalyDetection out of service map Contents into own component
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Move apm tutorial from apm plugin into apm_oss plugin
Closes#65629
* Fix types issues and some paths
* Add unregisterTutorial to tutorials_registry.mock
* Add apm path to .i18nrc.json to fix internationalization error
* Rename apm path in .i18nrc.json into apmOss and revert some imports paths
* Change apm oss plugin name from apm_oss to apmOss
* change plugin name
* update apm_oss -> apmOss inn requiredPlugins
Co-authored-by: mohinderps <mohin19derp@gmail.com>
* logging when security api is disable
* logging when security api is disable
* checking statuc code 400
* adding security plugin
* checking if security plugin is enabled before calling it
* fixing unit test
* show apm ui when index is empty
* addressing PR comments
* refactoring
* refactoring
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* migrate files from legacy path to new plugin path
* update file paths to reflect migrated files
* move minimal legacy client files back to legacy path in order to run kibana
* Completes the full cutover to the new kibana platform removing all shims and legacy adapters.
* Adds APM to ignored list for casing check.
* - moves public/utils/pickKeys.ts to common/utils/pick_keys.ts
- exposes getTraceUrl as a plugin static export of apm/public and updates import in infra
- fixes FeaturesPluginSetup import in apm/public app
- renames get_apm_index_pattern_titles -> get_apm_index_pattern_title
- getApmIndexPatternTitle is now a synchronous getter function
- removes unused comments and xpack.apm.apmForESDescription i18n translations
* Moves automatic index pattern saved object creation from
plugin start to when the Home screen first renders
* removed unnecessary legacy css imports
* fixed ci issues by:
- moving readOnly badge, and help extension setup to occure only
when apm app is mounted
- registering saved object types
- also moved createStaticIndexPattern from a react useEffect on the
APM home screen to when the app is mounted
* x-pack/watcher: use Elasticsearch from CoreStart
* x-pack/upgrade_assistant: use Elasticsearch from CoreStart
* x-pack/actions: use Elasticsearch from CoreStart
* x-pack/alerting: use Elasticsearch from CoreStart
* x-pack/lens: use Elasticsearch from CoreStart
* expressions: use Elasticsearch from CoreStart
* x-pack/remote_clusters: remove unused Elasticsearch dependency on CoreSetup
* x-pack/oss_telemetry: use Elasticsearch from CoreStart
* Cleanup after #59886
* x-pack/watcher: create custom client only once
* Revert "x-pack/watcher: create custom client only once"
This reverts commit 78fc4d2e93.
* Revert "x-pack/watcher: use Elasticsearch from CoreStart"
This reverts commit b621af9388.
* x-pack/task_manager: use Elasticsearch from CoreStart
* x-pack/event_log: use Elasticsearch from CoreStart
* x-pack/alerting: use Elasticsearch from CoreStart
* x-pack/apm: use Elasticsearch from CoreStart
* x-pack/actions: use Elasticsearch from CoreStart
* PR Feedback
* APM review nits
* Remove unused variable
* Remove unused variable
* x-pack/apm: better typesafety
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Revert "Revert "[APM] Collect telemetry about data/API performance (#51612)""
This reverts commit 6de7f2a62b.
* Update transaction mock data to reflect the type
* Factor our the license checking logic and messaging to common
* Add licensing plugin as a dependency of the APM plugin
* Throw a forbidden error on the server if trying to access the service map routes
* Closes @56832 Migrates uses of the saved objects client to the internal
and context scoped clients exposed in the new platform core setup
* moves apm server, common, and typings dirs to the new plugin directory
* fixes path imports and type errors
* fixes some lint errors
* fixes CI failure. Use internal saved objects client like before.
* uses the context-scoped saved objects client for saving runtime APM indices,
and uses the internal saved objects client when creating apm index
pattern, so that any user who navigates to apm can trigger it
* fixes the type check error by updating import paths
* renamed files and directories to snake_case to pass scripts/check_file_casing
* rebase fixes and commit filename case changes
* moves get_indices_privileges.ts out of legacy path
* expose ES clients without observables
* expose observable-less api to plugins
* update core api and mocks
* update plugins
* NP SO & legacy use updated API
* update SO tests
* update TSDocs
* update types
* update docs
* document createCluster analog in np
* typo
* Basic cleanup before refactoring for shim work
* shim WIP
* Removes the configuration adapter
* WIP more stuff
* WIP refactoring of shimming work
* WIP continues
* Logging UI now runs on top of new platform shim
* WIP continues
* Removes unused imports and variables
* Basic infra NP server shim in place
* Reimplemented graphql http error handling for infra NP server shim
* Adds new platform infra plugin to handle NP config for legacy server shim
* Basic cleanup before refactoring for shim work
* shim WIP
* Removes the configuration adapter
* WIP more stuff
* WIP refactoring of shimming work
* WIP continues
* Logging UI now runs on top of new platform shim
* WIP continues
* Removes unused imports and variables
* Basic infra NP server shim in place
* Reimplemented graphql http error handling for infra NP server shim
* Adds new platform infra plugin to handle NP config for legacy server shim
* Adds comment about duplicating full config for NP config
* Use New Platform features plugin to registerFeature()
* Re-arranging and relying on request context as uch as possible
* Refactors KibanaRequest for RequestHandlerContext
* fixes types for callWithRequest
* Moves callWithRequest method override types directly into class to get them working, need to fix this when we understand it better
* Fixes callWithRequest framework types
* Removes a few NP_TODO comments
* Fix broken imports
* Ensure GraphQL resolvers are actually passed requestContext and not the raw request, and switch to the savedObjects client via requestContext
* Remove the legacy traces of the savedObjects plugin
* Fixes TSVB access with NP raw requests and requestContext
* Remove unused getUiSettingsService (moved to requestContext)
* Migrate to new Spaces plugin
* Fix calculateMetricInterval after merged changes
* Reinstate and migrate the infrastructure metadata route
* Fix various type check errors
* Amend InfraSources lib unit tests
Mock the savedObjects client differently
* Amend MetricsExplorer API response
Renaming of variable inadvertently broke the response
* Remove GraphQLI references from feature controls tests
* Remove other GraphiQL references
* Fix security / access issue
* Add a framework level registerRoute method which always adds access tags by default
* *Temp* disable test
* Migrate the log rate validation endpoint to the new platform
Fully migrates the [Logs UI] log rate setup index validation #50008 PR to New Platform routing etc
* Amend types
* Example of how to expose APM get indices method in NP
* Fix calls to TSVB bug caused by object mutation
This is a temp fix as the TSVB NP migration will supercede this
* Converts getApmIndices function to accept saved object client, implements usage in infra
* Fix APM setup_request tests
* Fixes some unused references for linting
* Migrate all work from #50730 to NP
* Remove duplicate declaration files for rison_node and add a single source of truth at x-pack/typings/rison_node.d.ts for x-pack uses
* Moved type file back into infra plugin to bypass strange break
* Updates apm indices method signature per feedback from @elastic/apm-ui
* [APM] Migrate server routes to NP
Closes#49238.
Pass legacy API to NP plugin in order to use internal SO client
Fix issues with agent configuration APIs
Update tsconfig template for TS optimization
Fix typo
* Review feedback
* Fix type issues after browser duration changes
* Revert changes in getServices due to readability concerns
* Review feedback