* [APM] Fix anomalies not showing up on transaction charts
* Added API tests to check transaction groups charts for anomaly data
* Improve test names and assertions from PR feedback
* Updated the transaction groups chart API to make `environment` a
required param while making `uiFilters` optional
* updates the basic API tests for transaction_groups/charts with the
required `environment` param
* makes uiFIltersES default to [] on core setup and removes SetupUIFilters type
* fixes vertical shade
* - replaces uiFiltersES with esFilter & uiFilters and cleans up related code around these
- deduplicates the required environment in the transaction_groups/charts API
* updates basic apm_api_integration tests
* pr feedback
* updates api test snapshots with correct anomaly data
* removed environment query param from useTransactionCharts and ensures
it's included in uiFilters returned from useUrlParams
Co-authored-by: Oliver Gupte <olivergupte@gmail.com>
# Conflicts:
# x-pack/plugins/apm/public/utils/testHelpers.tsx
# x-pack/plugins/apm/server/lib/rum_client/get_long_task_metrics.ts
Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
* [ML] Switching to new es client
* further conversions
* fixing tests
* updating responses
* test commit
* refactoring shared services to removed context parameter
* removing last scoped clients
* removing ml js client
* udating file data viz errors
* fixing jest tests
* fixing types after merge with master
* error response changes
* adding default sizes to some requests
* adding custom error types for license checks
* tidying up shared function checks
* removing test data
* removing need for DummyKibanaRequest
* updating comment
* fixing functional api tests
* removing comments
* fixing types after master merge
* throw error rather than return it
* removing placeholder error
* changes based on review comments
* fixing types after merge with master
* fixing missing return
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [APM] Transaction duration anomaly alerting integration (#75719)
* 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>
* Fixes prettier linting
* Fixes prettier linting again
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* 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>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [APM] Optimize service map query
Closes#60411.
- Chunk trace lookup
- Remove pagination, move dedupe logic to server
* Fix imports
* Fix imports again
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
* 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
* [APM] Adds global service environment filter to all applicable pages and APIs via uiFilters pattern.
* [APM] addressed some PR feedback:
- removed useUiFilters custom hook, derives memoized uiFilters from urlParams with useMemo and use the obj ref in dependency array
- modified the layout of environments filter to use EuiFlex components
- added 'Select environment' label to seperator, changed capitalization to 'Not defined' option
- set services table set column widths to 40%,20% for first 2 cols, and added space to comma separated list of environments
- added tests for generating environment es filters
* [APM] rename getUiFilters -> useUiFilters since it's based on useMemo
* Service detail page refactor with TS conversions
* Adds error group list back to the service details page tabs
* Fixes after rebasing upstream master
* Adds integrations menu and flyouts, with no-transaction ML job creation and lookup
* WIP adds memory usage chart with fake data
* Adds error group distribution chart to metrics tab
* Metrics "memory" chart data flow from server to chart
* Server side query and transform set up for cpu charts
* CPU charts created
* Review feedback and watcher flyout
* Server tests added, broken tests fixed
* Review feedback
* Fixes up type problems
* Converts metric key paths to constants
* Fixes error group type issue after rebasing from master
* Makes transaction type filterable on transactions list tab
* Review feedback
* Chart formatting tweaks and fixes
* Fixes y-axis ticks for GB chart
* Restores machine learning annotations with some test fixes
* Continued styling and other review based changes
* More review fixes and cleanup
* Updated chartGroupProps -> hoverXHandlers
* Removes "type" column from transaction list table
* Re-centers around using urlParams
* Fixes panel item references in service integrations menu
* Serves default transaction type from /transactions route
* Reverts tooltip series ordering change
* Adds a clarification note about route config
* Makes it possible to request transaction chart data without specifying type
* Fixes empty series problem for memory chart
* Fixes tests
* Review feedback
* Fixes after rebase
* Replaces boolean casted array#find with array#some
Rename apmIndexPattern to apmIndexPatternTitle and narrow down search query
Fix tests
Remove unused aggregation
Revert "Rename apmIndexPattern to apmIndexPatternTitle and narrow down search query"
This reverts commit 5aa86744a0b360ceb75a59ebc8a0a084b24fbe50.
* Adds traces overview with mock data (#22628)
* Updates service overview snapshots
* Adds tests for ManagedTable and ImpactBar
* Refactored transaction overview to use new managed table component
* Removed jsconfig file in apm
* [APM] Distributed tracing - Trace details (waterfall) (#22763)
* [APM] Add typescript to waterfall (#23635)
* [APM] Migrate get_trace and constants to Typescript (#23634)
* [APM] Add types for setup_request (#23762)
* [APM] Adds trace overview queries and some refactoring (#23605)
* ImpactBar component to align EuiProgress usage for impact bars
* Sharing some logic between transaction and trace queries
* Typescript support
* Quick fix ‘banana’
* [APM] Ensure backwards compatibility for v1 and v2 (#23636)
* Make interfaces versioned
* Rename eventType to docType
* Fixes trace links on traces overview (#24089)
* [APM] use react-redux-request (#24117)
* Updated yarn lockfile for new yarn version
* Updated dependency issues for react-router-dom types
* [APM] Display transaction info on span flyout (#24189)
* [APM] Display transaction info on span flyout
* Brings in real location and url param data for transaction flyout
* Converts flyout to TS
* Adds query param state for flyouts with ts support
* Updates styles and uses EuiTabs for transaction flyout
* [APM] Transaction flyout
* [APM] Minor docs cleanup (#24325)
* [APM] Minor docs cleanup
* [APM] Fix issues with v1 spans (#24332)
* [APM] Add agent marks (#24361)
* [APM] Typescript migration for the transaction endpoints (#24397)
* [APM] DT transaction sample header (#24294)
Transaction sample header completed
* Fixes link target for traces overview to include trans/trace ids as query params
* Converts Transaction index file to TS
* Adds trace link to sample section
* Refactors the trace link and applies it to two usages
* Implements transaction sample action context menu
* Calculates and implements duration percentage
* Re-typed how transaction groups work
* Fixes transaction flyout links and context menu
* Removes unnecessary ms multiplication
* Removes unused commented code
* Finalizes infra links
* Fixes some type shenanigans