* Closes#48538 by removing the average duration by country custom geo map.
* adds link to client side monitoring below the rum charts
* removes unused translations
* Removes RUM-specific chart for Avg Duration By Browser
* Replace link under charts with CallOut above charts with link to Client Side Monitoring
* removes api integration tests for avg_duration_by_browser and usused i18n translations
* updates to copy in the CSM callout
* Grouped features for space management
* Apply suggestions from code review
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Address PR Feedback
* docs changes
* updating types/docs
* update APM feature name
* Reintroduce extraAction following EUI update
* change ordering of infra features, and render callout for management category
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* adding cgroup fields
* calculate the memory based on the cgroup fields otherwise use the system fields
* updating script
* adding api tests
* using cgroup fields on service map
* addressing PR comment
* fixing unit test
* fixing test
* changing api tests to use snapshot
* removing inactive_files from calculation
* fixing test
* refactoring painless script
* addressing PR comment
* addressing pr comments
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [APM] Optimize service overview queries
* Review feedback
* Use correct indices/filters for service overview metrics
* [APM] Optimize traces overview
* Separate queries into separate file
* Support union types for aggregations
* [APM] Don't fetch dynamic index pattern in setupRequest
We don't need a dynamic index pattern for parsing the filters from the query bar. Additionally, instead of fetching uiIndices in `getParamsForSearchRequest`, we can use `indices` that we already fetched in `setupRequest`.
* use join utility function to merge requests
* Correct path for UI_SETTINGS import
* Query transaction indices in getEnvironments()
* [APM] Introduce apm.types
Instead of using a combination of index + terms filters on processor.event, add a top-level setting that allows you to define a type, which can be a processor event type, agent configuration or custom link. This allows us to more easily compose queries.
* Set size of terms agg on error rate aggregation
* Metrics
* Use separate clients for apm events and other uses
* Separate function for calculating relative impact
* use UIProcessorEvent type in IURLParams type
* Remove unused import
* Split out strategy in helper functions
* Use cloneDeep in apmEventClient.search
* Consistent usage of getUseAggregatedTransactions
* Update traces functional test
* Update API tests
* Update responses for functional tests
* Review feedback
* Fix type for filter/filters aggregation
* Review feedback
* Rename useAggregatedTransactions > searchAggregatedTransactions
* Use correct route name for transaction redirect page
* Closes#67744.
* Review feedback; offer other strategies than 'auto'
* Fix functional tests
* [APM] Always load esarchives from common
Instead of requiring every test suite to store its archives under {suite}/fixtures/es_archiver, always load them from common/fixtures/es_archiver.
* Update script
* Make sure tests pass
* Update snapshots for API tests
* Filter for transaction.root when fetching top traces
* Make sure must_not clause is formatted correctly
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* replacing error rate to use event.outcome field
* addressing PR comment
* fixing api test
* fixing API test
* fixing api tests
* rmeoving snapshot from api test
* testing error rate
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
...in the table and the header. Did this by adding `word-break: break-all` to them.
Also:
* Rename List to TransactionList
* Add stories for TransactionList and ApmHeader
* Add missing type information to transactions based on sample transaction
Fixes#73960.
* [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>
* removing extra message
* adding x-axis values when no data is available
* reordering charts
* fixing internationalization
* fixing transaction RUM agent order
* addressing PR comment
* removing kpis list and show it in the chart legend instead
* fixing API test
* moving asPercent to the common directory
* fixing api test
* fixing unit test
* removing unused prop
* fixing unit test
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* 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>
* bump ts to v4
* MOAR RAM
* fix type errors for OSS
* first pass on x-pack errors
* second pass on x-pack type errors
* 3rd pass on x-pack type-errors
* mute errors if complex cases
* don't delete if spread suffices
* mute other complex cases
* make User fields optional
* fix optional types
* fix tests
* fix typings for time_range
* fix type errors in x-pack/tests
* rebuild kbn-pm
* remove leftovers from master update
* fix alert tests
* [Telemetry Checker] TS4 Fixes
* bump to 4.0.1-rc
* fix new errors in master
* bump typescript-eslint to version supporting TS v4 syntax
* fix merge commit errors
* update to the stable TS version 4.0.2
* bump ts-eslint to version supporting ts v4
* fix typo
* fix type errors after merge
* update ts in another new package.json
* TEMP: remove me
* Revert "TEMP: remove me"
This reverts commit dc0fc3bae6.
* [Telemetry] Update snapshot for new TS4 SyntaxKind
* bump prettier to support TS v4 syntax
* fix prettier rules
* last style change
* fix new type errors
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
This PR removes the alerting and actions ui privileges (alerting:show, actions:show, etc...) and instead relies on the standard Kibana feature control model to decide whether management displays the Alerts Management section under management.
* adapt retryCallCluster for new ES client
* review comments
* retry on 408 ResponseError
* remove legacy retry functions
* use Migrator Es client in SO migration
* update migration tests
* improve ES typings and mocks
* migrate decorate ES errors
* add repository es client
* use new es client in so repository
* update repository tests
* fix migrator integration tests
* declare _seq_no & _primary_term on get response. _source expect to be a string
* make _sourceIncludes and refresh compatible with the client
* add test for repository_es_client
* move ApiResponse to es client mocks
* TEMP: handle wait_for as true for deleteByNamespace
* add tests for migration_es_client
* TEMP: skip test for deleteByNamespace refresh
* pass ignore as transport option in mget
* log both es client and response errors
* fix update method test failures
* update deleteByNamespace refresh settings
es doesn't support 'refresh: wait_for' for `updateByQuery` endpoint
* update repository tests. we do not allow customising wait_for
* do not delegate retry logic to es client
* fix type errors after master merged
* fix repository tests
* fix security solutions code
SO doesn't throw Error with status code anymore. Always use SO error helpers
* switch error conditions to use SO error helpers
* cleanup
* address comments about mocks
* use isResponseError helper
* address comments
* fix type errors
Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
This PR adds _Role Based Access-Control_ to the Alerting framework & Actions feature using Kibana Feature Controls, addressing most of the Meta issue: https://github.com/elastic/kibana/issues/43994
This also closes https://github.com/elastic/kibana/issues/62438
This PR includes the following:
1. Adds `alerting` specific Security Actions (not to be confused with Alerting Actions) to the `security` plugin which allows us to assign alerting specific privileges to users of other plugins using the `features` plugin.
2. Removes the security wrapper from the savedObjectsClient in AlertsClient and instead plugs in the new AlertsAuthorization which performs the privilege checks on each api call made to the AlertsClient.
3. Adds privileges in each plugin that is already using the Alerting Framework which mirror (as closely as possible) the existing api-level tag-based privileges and plugs them into the AlertsClient.
4. Adds feature granted privileges arounds Actions (by relying on Saved Object privileges under the hood) and plugs them into the ActionsClient
5. Removes the legacy api-level tag-based privilege system from both the Alerts and Action HTTP APIs
* adding api test for transaction_groups /breakdown and /avg_duration_by_browser
* adding filter by transaction name
* adding filter by transaction name
* addressing pr comments
* fixing TS issue
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Add a task to gather transasctions telemetry as described in #71593.
Also:
* Fix typo in mapping for country code mapping
* Add back `mergeTelemetryMapping` function to fix broken `upload-telemetry-data` script.
Make the `getErrorRate` function used in the error rate charts additionally take `service.environment` as a filter and have it return the `average` of the values.
Call that function in the API for the service map metrics.
Fixes#68160.
Co-authored-by: cauemarcondes <caue.marcondes@elastic.co>
* Add a date range of `now-1d` to the cloud query
* Add a timeout of 5m to all queries (we'll investigate using async queries to improve this in the future.)
* Factor out the date range filter into a variable
* Fix a bug with the `indices_stats` tasks when it doesn't return data
* Update the merge mapping script to create a migration file