Commit graph

259 commits

Author SHA1 Message Date
Shahzad
fdee5e59a7
[CSM] Fix core vital legend background (#78273)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 13:54:43 +02:00
Dario Gieselaar
87ad564b59
[APM] Use transaction metrics for distribution charts (#78484)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 13:00:32 +02:00
Shahzad
d7a8641f3a
[CSM] Js errors (#77919)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 15:36:38 +02:00
Cauê Marcondes
966f00ac59
[APM] Alerting: Add global option to create all alert types (#78151)
* adding alert to service page

* sending on alert per service environment and transaction type

* addressing PR comment

* addressing PR comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 15:12:58 +02:00
Oliver Gupte
1dd0c6a570
[APM] Service maps grouped external resource nodes (#78136)
* Closes #78135 by implementing node grouping on service map data before it's rendered in the Cytoscape.

* Truncates resource list items and updates api test snapshot

* Added type for ConnectionElement rather using an ad hoc type, removed some unneeded ts-ignores
2020-09-24 07:48:24 -07:00
Shahzad
3618cef1a4
[UX] Update csm app name to UX (#78179) 2020-09-24 13:26:00 +02:00
Shahzad
477f6a182e
[CSM] Fix pie chart legend (#78253) 2020-09-24 09:10:00 +02:00
Shahzad
9276a16db7
[CSM] Url search (#77516)
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-23 12:51:39 +02:00
Matthew Kime
533309dc2c
Remove [key: string]: any; from IIndexPattern (#77968)
* Remove [key: string]: any; from IIndexPattern
2020-09-22 18:03:22 -05:00
Shahzad
7544a33901
[CSM] Use stacked chart for page views (#78042) 2020-09-22 18:00:19 +02:00
Dario Gieselaar
7053ad1a47
[APM] Use transaction metrics for transaction error rate (#78009)
Closes #77716.
2020-09-22 09:16:58 +02:00
Oliver Gupte
f015beae13
[APM] Replace custom map with link to Client Side Monitoring (#77458)
* 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
2020-09-21 14:57:20 -07:00
Dario Gieselaar
ce7922be95
[APM] Use model_plot as a signal for anomaly scores (#77756) 2020-09-21 12:18:45 +02:00
Larry Gregory
9f3992f6c2
Grouped features for space management (#74151)
* 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>
2020-09-18 12:30:59 -04:00
Shahzad
e7a8aed594
[CSM] Fix total blocking time formatting (#77751) 2020-09-18 15:53:42 +02:00
Dario Gieselaar
217276e8a9
[APM] Align APM severity levels with ML (#77818) 2020-09-18 14:02:37 +02:00
Cauê Marcondes
e7b0e28237
[APM] Track usage of Gold+ features (#77630)
* adding license check

* fixing api test

* refactoring
2020-09-18 10:14:13 +02:00
Søren Louv-Jansen
fb6292965b
[APM] Add transaction error rate alert (#76933) 2020-09-17 22:38:14 +02:00
Cauê Marcondes
9c90c14b25
[APM] Show accurate metrics for containerized applications (#76768)
* 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>
2020-09-17 18:13:06 +02:00
Shahzad
5be36b799d
[CSM Dashboard] Remove points from line chart (#77617)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-17 13:02:20 +02:00
Dario Gieselaar
8169ed173b
[APM] Metrics-powered UI (#73953)
* [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>
2020-09-16 19:20:08 +02:00
Dario Gieselaar
78774e4925
[APM] Disable incremental builds for APM-only type check (#77581) 2020-09-16 16:50:45 +02:00
Shahzad
10b192b5b0
[RUM Dashboard] User experience metrics (#77384)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-16 15:34:28 +02:00
Cauê Marcondes
89af7e676d
showing service maps when filte by environment not defined (#77483) 2020-09-16 10:40:58 +02:00
Dario Gieselaar
520d348bf8
[APM] Service inventory redesign (#76744)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 16:10:04 +02:00
Larry Gregory
2e34eb239f
Hide management sections based on cluster/index privileges (#67791)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-14 09:30:47 -04:00
Mikhail Shustov
bcaffba12b
Remove legacy SavedObjects (#76852)
* remove legacy SO integration

* cleanup integration in the legacy platorm

* remove so schema

* update docs

* remove leftovers, update docs

* update docs after merge master
2020-09-08 22:01:31 +02:00
Shahzad
e827a6761e
[RUM Dashboard] Added rum core web vitals (#75685)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-08 17:19:48 +02:00
Cauê Marcondes
7f323a19bb
[APM] Use the outcome field to calculate the transaction error rate chart (#75528)
* 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>
2020-09-07 11:23:22 +02:00
Dario Gieselaar
113936a649
[APM] Use observer.hostname instead of observer.name (#76074) 2020-09-07 11:11:00 +02:00
Nathan L Smith
4d4eae4413
[APM] Fix overlapping transaction names (#76083)
...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.
2020-09-04 15:10:52 -05:00
Shahzad
33d366a5e9
[RUM Dashboard] Rum usability improvement (#76024)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-04 14:05:20 +02:00
Søren Louv-Jansen
e0f4775b78
[APM] @ts-error -> @ts-expect-error (#76492)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-04 06:52:16 +02:00
Wylie Conlon
26d16dd093
[APM] Update aggregations to support script sources (#76429)
* [APM] Update aggregations to support script sources

* Fix whitespace

* Fix checks

* Explicitly require field in projection

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2020-09-03 12:23:29 -04:00
Dario Gieselaar
3e077973e8
[APM] Immediately return terms for unbound queries (#74543)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-02 16:11:12 +02:00
Shahzad
093f588720
[RUM Dashboard] Use median values instead of averages to display page load times (#76407) 2020-09-02 15:35:33 +02:00
James Gowdy
4762cf56f5
[ML] Switching to new es client (#74965)
* [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>
2020-09-02 14:07:57 +01:00
Cauê Marcondes
bf7b4782e6
[APM] Remove additional "No data" message and re-ordering charts (#75399)
* 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>
2020-09-01 13:38:45 +02:00
Cauê Marcondes
712c4bdde7
[APM] Prevent imports of public in server code (#75979)
* renaming test file

* removing eslint rule

* restructuring observability types

* refactoring fetchOptions type
2020-08-28 12:43:49 +02:00
Oliver Gupte
b1cb8b8c7f
[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>
2020-08-27 21:19:36 -07:00
Mikhail Shustov
37ec1e1053
Update to TS v4 (#73924)
* 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>
2020-08-27 10:28:02 +02:00
Dario Gieselaar
789b67fb5f
[APM] Improvements for breakdown data gaps (#75534)
Closes #69704, #73387, #43780.
2020-08-26 10:59:44 +02:00
Shahzad
2c865f5649
[RUM Dashboard] Create new path for client side monitoring (#74740) 2020-08-19 19:05:53 +02:00
Mikhail Shustov
88c0631344
Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)
* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
2020-08-05 17:32:19 +02:00
Dario Gieselaar
c66ea65ec1
[APM] Use apmEventClient for querying APM event indices (#73449)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-31 15:22:04 +02:00
Søren Louv-Jansen
aa68e3b63a
[APM] Add anomaly detection API tests + fixes (#73120)
Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
2020-07-30 09:09:54 -05:00
Gidi Meir Morris
f4104743e3
[Alerting] Control Alerts Management via feature controls & privileges (#72029)
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.
2020-07-28 15:20:24 +01:00
Dario Gieselaar
19532fc439
[APM] Optimize traces overview (#70200)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 15:53:23 +02:00
Mikhail Shustov
2a82ff9566
[KP] use new ES client in SO service (#72289)
* 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>
2020-07-25 11:59:56 +02:00
Gidi Meir Morris
4abe864f10
Adds Role Based Access-Control to the Alerting & Action plugins based on Kibana Feature Controls (#67157)
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
2020-07-22 14:45:57 +01:00