Commit graph

103 commits

Author SHA1 Message Date
Shahzad edbf6b8ce9
[UX] Fixed error rate, made sure all filters are applied (#79222)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-10-06 18:48:35 +02:00
Shahzad de130abfbc
[UX] Add core web vitals in obsv homepage (#78976) 2020-10-05 19:15:13 +02:00
Søren Louv-Jansen 4ddcd1d2a6
[APM] Fix anomalies not showing up on transaction charts (#76930)
* [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>
2020-10-02 00:45:50 -07:00
Shahzad 8406e04a42
Fix long tasks query (#79099) 2020-10-01 22:49:31 +02:00
Shahzad 07ebb81a79
[UX] Improve page-load axis (#78392)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-01 10:16:30 +02:00
Shahzad a31dd64778
[UX] Add percentile selector (#78562) 2020-09-30 10:24:38 +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
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
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
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
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
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
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
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
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
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
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
Cauê Marcondes 4dcf719edb
Adding api test for transaction_groups /breakdown and /avg_duration_by_browser (#72623)
* 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>
2020-07-22 15:01:29 +02:00
Søren Louv-Jansen 511e4543a7
[APM] Handle ML errors (#72316)
* [APM] Handle ML errors

* Add capability check

* Improve test

* Address Caue’s feedback

* Move getSeverity

* Fix tsc

* Fix copy
2020-07-21 08:41:15 +02:00
Cauê Marcondes 22365de6ed
[APM] Removing Missing permission page (#72030)
* removing missing permission page

* removing translations
2020-07-16 14:41:07 +02:00
Nathan L Smith f69edbd89b
[APM] Add error rates to Service Map popovers (#69520)
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>
2020-07-15 07:17:54 -05:00
Shahzad c7eaf39bfe
[Uptime] Visitors breakdowns and enable rum view only via URL (#71428)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 22:39:44 +02:00
Cauê Marcondes 90f233b5eb
[APM] Use status_code field to calculate error rate (#71109)
* calculating error rate based on status code

* fixing unit test

* addressing pr comments

* adding erroneous transactions rate

* adding erroneous transactions rate

* adding error rate to detail page

* fixing i18n

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 12:20:12 +02:00
Cauê Marcondes 3374b2d3b0
[Observability] Change appLink passing the date range (#71259)
* changing apm appLink

* changing apm appLink

* removing title from api

* adding absolute and relative times

* addressing pr comments

* addressing pr comments

* addressing pr comments

* fixing TS issues

* addressing pr comments

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-14 11:05:48 +02:00
Søren Louv-Jansen 327fed87bb
[APM] Improvements to the ML Settings page (#71309) 2020-07-13 17:21:22 +02:00
Oliver Gupte f0c9915280
[APM] Anomaly detection integration with transaction duration chart (#71230)
* Reintroduces the previous anomaly detection ML integration back into the
transaction duration chart in the service details screen. Support the
latest APM anoamly detection by environment jobs.

* PR feedback

* Code improvements from PR feedback

* handle errors thrown when fetching ml job for current environment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-13 08:09:04 -07:00
Oliver Gupte b302565567
[APM] Service maps anomaly detection integration by environment (#70932)
* Closes #69480 & #70419.
- Adds anomaly detection integration to service maps backed by apm ML jobs per environment
- Loads transaction stats and anomalies for each transaction types
- Renders a selector in the popop to choose a transaction type to view stats

* - implements original anomaly detection integration design for service maps popover
- only aggregates transaction KPIs and anomaly scores for transaction.type = "request" or "page-load"
- supports environment filter 'All' option to display data from all APM anomaly detection jobs
- handle case where popover metrics don't exist for services outside the current environment filter

* fixes some CI errors

* Simplified messaging for service popop with not data in the current environment

* PR feedback, renamed max anomalies -> service anomalies including the file name

* - defines custom_settings.job_tags.apm_ml_version in ML job creation,
  then filters for it when returing valid APM ML jobs

* changes shape of of service anomalies from an array to a object keyed by serviceName

* removes the url encoding from ML job link href to how it was previously.

* PR feedback

* Popover no data state simplified:
- renders the "no data" message as plain text instead of in a callout
- hides the 'Anomaly detection' section if there is not anomaly data.

* Fixes filtering bug when user selects 'Environment: Not defined'. Now
filters properly by filtering for docs where service.environment does
not exist

* filters jobs fetched in the settings page by `job.custom_settings.job_tags.apm_ml_version`

* Fixed bad import from last upstream merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-09 05:22:34 -07:00
Søren Louv-Jansen 58cdbf0fe6
[APM] Add warning to notify user about legacy ML jobs (#71030) 2020-07-09 08:45:13 +02:00
Shahzad 949941758f
[RUM Dashboard] New rum services api to replace usage of get services API (#70746) 2020-07-08 11:26:34 +02:00
Søren Louv-Jansen cb6fbc0e1b
[APM] Add API tests (#70740) 2020-07-07 22:40:28 +02:00
Oliver Gupte 7d44d022c9
[APM] Adds 'Anomaly detection' settings page to create ML jobs per environment (#70560)
* Adds 'Anomaly detection' settings page along with require API endpoints
to list and create the apm anomaly detection jobs per environment.
Some test data is hardcoded while the the required changes in the ML
plugin are in flight.

* Converts the environment name to a compatible ML id string and persist
in groups array. Also adds random token to the job ID to prevent
collisions for job ids where diffferent environment names convert to the
same string

* - Improve job creation with latest updates for the `apm_transaction` ML module
- Implements job list in settings by reading from `custom_settings.job_tags['service.environment']`
- Add ML module method `createModuleItem` for job configuration
- Don't allow user to type in duplicate environments

* Update x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/add_environments.tsx

Co-authored-by: Casper Hübertz <casper@formgeist.com>

* Update x-pack/plugins/apm/public/components/app/Settings/anomaly_detection/index.tsx

Co-authored-by: Casper Hübertz <casper@formgeist.com>

* UX feedback, adds i18n, and handles failed state for ML jobs fetch.

* - Moves get_all_environments from agent_configuration dir to common dir
- makes the 'all' environment name ALL_OPTION_VALUE agent configuration-specific
- replace field literals with constants

* PR feedback

* Adds support to create jobs for environment which are not defined.

* Fixes description copy, rearranges settings links, and makes sure the 'Not defined' option is disabled if it already exists.

* Only show "Not defined" in environment selector if there are actually
documents without service.environment set

* get the indexPatternName for the ML job from the set of user-definned indices

* updated job_tags type definition

Co-authored-by: Casper Hübertz <casper@formgeist.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-07 13:30:14 +02:00
Tiago Costa 6c62c686cf
chore(NA): upgrade to lodash@4 (#69868)
* chore(NA): upgrade oss to lodash4

chore(NA): migrate cli, cli_plugin, cli_keystore,  dev, test_utils and apm src script to lodash4

chore(NA): missing file for cli plugin

chore(NA): add src core

chore(NA): es archiver and fixtures

chore(NA): try to fix functional test failure

chore(NA): migrate src/legacy entirely to lodash4 except src/legacy/core_plugins

chore(NA): move legacy core plugins to lodash4

chore(NA): upgrade optimize to lodash4

chore(NA): upgrade to lodash4 on advanced_settings, charts, console and dashboard

chore(NA): migrate to lodash4 on dev_tools, discover, embeddable, es_ui)shared, expressions, home plugins

chore(NA): upgrade data plugin to lodash4

chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4

chore(NA): missing data upgrades to lodash4

Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4"

This reverts commit 137055c5fed2fc52bb26547e0bc1ad2e3d4fe309.

Revert "Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4""

This reverts commit f7e73688782998513d9fb6d7e8f0765e9beb28d1.

Revert "chore(NA): missing data upgrades to lodash4"

This reverts commit 92b85bf947a89bfc70cc4052738a6b2128ffb076.

Revert "chore(NA): upgrade data plugin to lodash4"

This reverts commit 88fdb075ee1e26c4ac979b6681d8a2b002df74c6.

chore(NA): upgrade idx_pattern_mgt, input_control_vis, inspector, kbn_legacy, kbn_react, kbn_usage_collections, kbn_utils, management and maps_legacy to lodash4

chore(NA): map src plugin data to lodash3

chore(NA): missing lodash.clonedeep dep

chore(NA): change packages kbn-config-schema deps

chore(NA): update renovate config

chore(NA): upgrade vis_type plugins to lodash4

chore(NA): move vis_type_vislib to lodash3

chore(NA): update visualizations and visualize to lodash4

chore(NA): remove lodash 3 types from src and move test to lodash4

chore(NA): move home, usage_collection and management to lodash 3

Revert "chore(NA): move home, usage_collection and management to lodash 3"

This reverts commit f86e8585f02d21550746569af54215b076a79a3d.

chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3

chore(NA): update x-pack test to mock lodash4

Revert "chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3"

This reverts commit 2d10fe450533e1b36db21d99cfae3ce996a244e0.

* chore(NA): move x-pack and packages to lodash 4

* chore(NA): remove mention to lodash from main package.json

* chore(NA): remove helper alias for lodash4 and make it the default lodash

* chore(NA): fix last failing types in the repo

* chore(NA): fix public api

* chore(NA): fix types for agg_row.tsx

* chore(NA): fix increment of optimizer modules in the rollup plugin

* chore(NA): migrate `src/core/public/http/fetch.ts` (#5)

* omit undefined query props

* just remove merge usage

* fix types

* chore(NA): fixes for feedback from apm team

* chore(NA): recover old behaviour on apm LoadingIndeicatorContext.tsx

* chore(NA): fixes for feedback from watson

* Platform lodash4 tweaks (#6)

* chore(NA): fix types and behaviour on src/core/server/elasticsearch/errors.ts

* Canvas fixes for lodash upgrade

* [APM] Adds unit test for APM service maps transform (#7)

* Adds a snapshot unit test for getConnections and rearranges some code to make testing easier

* reverts `ArrayList` back to `String[]` in the painless script within `fetch_service_paths_from_trace_ids.ts`

* chore(NA): update yarn.lock

* chore(NA): remove any and use a real type for alerts task runner

Co-authored-by: Gidi Meir Morris <github@gidi.io>

* chore(NA): used named import for triggers_actions_ui file

* chore(NA): fix eslint

* chore(NA): fix types

* Delete most uptime lodash references.

* Simplify. Clean up types.

* [Uptime] Delete most uptime lodash references (#8)

* Delete most uptime lodash references.

* Simplify. Clean up types.

* chore(NA): add eslint rule to avoid using lodash3

* chore(NA): apply changes on feedback from es-ui team

* fix some types (#9)

* Clean up some expressions types.

* chore(NA): missing ts-expect-error statements

* Upgrade lodash 4 vislib (#11)

* replace lodash 3 with lodash 4 on vislib plugin

* Further changes

* further replacement of lodash3 to 4

* further work on upgrading to lodash 4

* final changes to update lodash

* chore(NA): upgrade data plugin to lodash4

chore(NA): upgrade data plugin public to lodash4

chore(NA): fix typecheck task

chore(NA): fix agg_config with hasIn

chore(NA): assign to assignIn and has to hasIn

chore(NA): upgrade data plugin server to lodash4

chore(NA): new signature for core api

fix(NA): match behaviour between lodash3 and lodash4 for set in search_source

* chore(NA): remove lodash3 completely from the repo

* chore(NA): fix x-pack/test/api_integration/apis/metrics_ui/snapshot.ts missing content

* chore(NA): fix lodash usage on apm

* chore(NA): fix typecheck for maps

* Patch lodash template (#12)

* Applying changes from https://github.com/elastic/kibana/pull/64985

* Using isIterateeCall, because it seems less brittle

* Also patching `lodash/template` and `lodash/fp/template`

* Reorganizing some files...

* Revising comment

* Ends up `_` is a function also... I hate JavaScript

Co-authored-by: Pierre Gayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Oliver Gupte <ogupte@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: kobelb <brandon.kobel@elastic.co>
2020-07-03 01:30:13 +01:00
Dario Gieselaar 429805d1b8
[APM] Don't fetch dynamic index pattern in setupRequest (#70308)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-02 15:19:21 +02:00
Shahzad df44a3e779
[RUM Dashboard] Chart breakdowns (#69420)
Co-authored-by: Casper Hübertz <casper@formgeist.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-29 20:54:52 +02:00
Nathan L Smith 8e57db696a
[APM] Use licensing from context (#70118)
* [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`.
2020-06-29 08:23:52 -05:00
Cauê Marcondes 41ecf39539
[APM]Create API to return data to be used on the Overview page (#69137)
* Adding apm data fetcher

* removing error rate

* chaging observability dashboard routes

* APM observability fetch data

* fixing imports

* adding unit test

* addressing PR comments

* adding processor event in the query, and refactoring theme

* fixing ts issues

* fixing unit tests
2020-06-26 11:11:42 +02:00
Dario Gieselaar 589d6ffd22
[APM] Catch annotations index permission error and log warning (#69881)
Relates to #69642. If the user doesn't have the appropriate privileges for the annotations index, instead of failing with a 500, we now catch the error and log a warning to the console.
2020-06-25 16:55:46 +02:00
Shahzad 550b95f172
[RUM Dashboard] Initial version resubmit (#69531)
Co-authored-by: Casper Hübertz <casper@formgeist.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-18 20:32:10 +02:00
spalger 03a24fbb67 Revert "[RUM Dashboard] Initial Version (#68778)"
This reverts commit 72111702e9.
2020-06-18 09:13:26 -07:00
Shahzad 72111702e9
[RUM Dashboard] Initial Version (#68778)
Co-authored-by: Casper Hübertz <casper@formgeist.com>
2020-06-18 17:13:28 +02:00
Cauê Marcondes 4ce91b342c
[APM] Add error rate chart to Errors overview and detail views (#67327)
* creating error rate chart

* adding error line chart

* creating error rate chart

* using date_histogram

* reapplying prettier style

* changing to theme color

* dont sync tooltips

* adding avg on error charts

* addressing pr comments

* adding possibility to disable legend toggle

* removing x-axis ticks from histogram

* return no percent when transaction count doesn return hits

* addressing PR comments

* addressing PR comments

* returning null when there is no transaction count

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-18 12:31:22 +02:00
Nathan L Smith 2642d658c4
[APM] License feature tracking for service maps (#69455)
Use the license feature API to register the service maps feature and track its usage when the API endpoint is accessed.

Fixes #64850.
2020-06-17 19:18:15 -05:00
Mikhail Shustov f593455a62
Bump TypeScript to v3.9 (#67666)
* add babel support for export type

* bump ts version to 3.9.3

* rebuild kbn-pm

* bump typescript-eslint

* fix error in security plugin UI

* check export as works

* fix app migration type

* use correct test subj attribute

* fix errors from the old PR

* embeddable is already passed in props

* explicitly define type of fetch

* add some types for viz

* fix fetch type p.2

* add null to allow spreading without type errors due to override

* add type guard to fix type error

* cast to any, since cannot assign unknown

* add timestamp to known types

* fix type error in fetch

* fix type error. id is always defined in attibutes

* declare a type

* move ts-ignore to the lines with errors

* declare tuple type explicitly

* mute type error. cannot assign unknown

* fix errors. id is always defined

* fix error type

* fix override errors. id is always defined

* fix error. extends any doesn't work anymore

* fix type error. type is always defined

* env doesn't always contain values

* fix type error

* cast to string

* add: logs is already declared in getNodeLogsUrl

* state is already  passed in props

* fix some errors in timelion

* number of fragments is always defined

* 'absolute' is not just string, but value

* TEMP: option is always defined

* always true if cast to promise manually

* both props are always defined

* explicitly define returned SO type

* workaround type

* bump tslib to be compatible with ts v3.9

* test private property

* rebuild kbn-pm

* Fix ts errors for beats management

* Fix type inference broken by the TS 3.9 upgrade

* Fix ingest manager saved object attributes typings

* Fix TS errors in cross_cluster_replication and index_management.

* Fix TS error in Watcher.

* roll back colorRange wrong type

* fix security plugin types

* TypeScript 3.9 fixes for APM

* Fix ColorRange types.

* fix actions & alerts errors. ByGidi

* fix lists error

* More APM fixes

* Remove paramaterization from `removeEmpty in agent config SettingsPage component (it's only used there and doesn't need to be parameterized.)
* Add option chain for case in registerTransactionDurationAlertType
* Cast `overallValue` in transform_metrics_chart
* Use more specific type for custom link filters
* Add more option chaining for local UI filters buckets response
* Remove unused parameters from routes
* Fix getProjection type parameter
* Use destructuring in serviceNodesLocalFiltersRoute to hide `never` error
* Revert `UnionToIntersection` change in `AggregationResponseMap`

Fixes #67804.

* fix platform type error

* Fix visualizations types.

* Fix data plugin types.

* bump TS version to 3.9.5

* Fix telemetry TS errors

* Fix dashboard code

* Adding Canvas Fixes for TS 3.9

* Fix case and security_solution types

* roll back to the old export syntax. new one might cause problems in api-extractor

* update docs

* Fix timelion code

* Fix meta

* Fix types

* fix type errors om ingest_manager

* bump babel deps

* enable private props & methods syntax

* update kbn-pm dist

* whitelist 0BSD license

* use @babel/plugin-proposal-private-methods in default set as well

* disable new babel plugins

* Revert "disable new babel plugins"

This reverts commit 04d959431d.

* cleanup security_solution types

* Fixes type error for newer TypeScript

* update docs

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
Co-authored-by: Felix Stürmer <stuermer@weltenwort.de>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
Co-authored-by: Walter Rafelsberger <walter@elastic.co>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: FrankHassanabad <frank.hassanabad@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-11 10:04:09 +02:00
Oliver Gupte cac9018f81
[APM] Service maps - Fix missing ML status for services with jobs but no anomalies (#68486)
* 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>
2020-06-09 20:58:46 -07:00
Nathan L Smith d1ed207945
APM TypeScript improvements (#68572)
* Add `compilerOptions.noErrorTrunctation` to the tsconfig template
* Remove unused parameters

Not adding `noUnusedParamaters` to the tsconfig since we get too many hits from dependencies when running `tsc`. These do show up in the editor as warnings, though.
2020-06-08 17:56:06 -05:00