Commit graph

1454 commits

Author SHA1 Message Date
Mikhail Shustov
3c8fa527a7
[ES] Upgrade client to v8.0 (#113950)
* bump to a pre-8.0 version

* export KibanaClient from /lib sub-folder

* workaround the problem of the absence of estypes

* update es client usage in pacakges

* export estypes from another path

* import errors from root

* import errors from root 2

* update transport import

* update import path for /api/types

* update import path for /api/types

* import errors from top export

* use TransportResult instead if ApiResponse

* fix errors in client_config

* fix src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts

* use KibanaClient in mock. we dont export the original Client

* fix client mocks

* fix errors on SO

* fix remaining core errors

* update estype import path

* fix errors in data plugin

* fix data_views

* fix es_ui_shared

* fix errors in interactive_setup

* fix errors in ./test folder

* add @elastic/transport to the runtime deps

* fix errors in packages

* fix erros in src/core

* fix errors in test/

* fix an error in actions plugin

* woraround and fix errors in APM plugin

* fix errors in canvas

* fix errors in event_log

* fix errors in fleet

* fix errors in ILM

* fix errors in infra

* fix errors in ingest_pipeline

* fix errors in lens

* fix errors in license_management

* fix errors in licensing

* fix errors in logstash

* fix errors in ml

* fix errors in monitoring

* fix errors in observability

* fix errors in rule_registry

* fix errors in reporting

* fix errors in rule_registry

* fix errors in security

* fix errors in security_solution

* fix errors in snapshot_restore

* fix errors in transform

* fix errors in UA

* fix errors in uptime

* fix errors in x-pack/test

* fix eslint errors

* fix new errors

* use default HTTP Connection. Undici does not support agent config options keepAlive and maxSockets

* create does not accept require_alias option

* update deps

* use transport types exported from ES client package

* fix ErrorCause | string errors

* do not use enum

* fix errors in data plugin

* update x-pack code

* fix transport

* fix apm search request

* do not crash on reporting

* fix kbn-test build

* mute reporting error to start

* fix ftr build

* another attempt

* update import path

* address or mute new errors

* REMOVE me. pin transport version temporarily.

* remove deep imports from transport package

* fix jest crash

* fix product check tests

* remove unnecessary ts-expect-error

* fix a few failed unit tests

* bump to canary 24

* remove unnecessary ts-expect-error

* remove dependency on transport

* fix types in tests

* mute errors in xpack tests

* product check doesn;t  spam in logs anymore

* filterPath --> filter_path

* ignoreUnavailable --> ignore_unavailable

* ignoreUnavailable --> ignore_unavailable

* trackScores --> track_scores

* trackTotalHits --> track_total_hits

* fix es-arcives

* fix data plugin crashes

* fix watcher test utils

* rollback unnecessary changes

* fix another problem in es-archiver

* fix scroll. for whatever reason scroll fails when request scroll_id in body

* add meta: true in kbn-securitysolution-es-utils

* bump client to canary 25

* fix errors in accordance with the es client spec

* update securityscolution-es-utils

* unify scroll api in reporting and fix tests

* fix unit tests in watcher

* refactor APM to abort request with AbortController API

* fix missing es client calls in tests

* fix missing meta in detection engine FTR tests

* fix another bunch of errors in js tests

* fix wrong coercion

* remove test-grep pattern

* fix apm unit test

* rename terminateAfter to terminate_after in infra plugin

* rename terminateAfter to terminate_after in uptime plugin

* rename terminateAfter to terminate_after in apm plugin

* fix security roles FTR tests

* fix reference

* fix post_privilidges test

* fix post_privilidges

* bump client to 26

* add meta for index_management test helpers

* remove ts-expect-error caused by bad type in reason

* bump client to 27

* REMOVE me. workaround until fixed in the es client

* fix incorrect type casting

* swtich from camelCase params

* use `HttpConnection` for FTR-related clients

* bump client to 29

* Revert "REMOVE me. workaround until fixed in the es client"

This reverts commit c038850c09.

* fix new util

* revert repository changes

* do not crash if cannot store event_loop data

* fix new estypes imports

* fix more types

* fix security test types and add ts-ignore for custom ES client

* fix more estypes imports

* yet more ts violations

* line by line fixing is hard

* adapt `evaluateAlert` from infra as it's also used from FTR tests

* use convertToKibanaClient in FTR test instead of meta:true in plugin code

* migrate from deprecated API in fleet

* fix intergration tests

* fix fleet tests

* fix another fleet test

* fix more tests

* let's call it a day

* Removes custom header check on 404 responses, includes es client ProductNotSupportedError in EsUnavailableError conditional (#116029)

* Removes custom header check on 404 responses, includes es client ProductNotSupportedError in EsUnavailableError conditional

* Updates proxy response integration test

* disable APM until compatible with client v8

* skip async_search FTR test

* use kbnClient in integration tests

* bump version to 29

* bump to 30

* have configureClient return a KibanaClient instead of Client, remove resolved violations.

* bump to 31

* bump to 31

* Revert "bump to 31"

This reverts commit 5ac713e640.

* trigger stop to unusubscribe

* update generated docs

* remove obsolete test

* put "as" back

* cleanup

* skip test

* remove new type errors in apm package

* remove ErrorCause casting

* update a comment

* bump version to 32

* remove unnecessary ts-expect-error in apm code

* update comments

* update to client v33

* remove outdated type definition

* bump to 34 without params mutation

* unskip the test that should not fail anymore

* remove unnecessary ts-expect-error comments

* update to v35. body can be string

* move `sort` to body and use body friendly syntax

* fix a failing test. maps register the same SO that has been already registered by home

Co-authored-by: pgayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2021-10-26 14:08:22 +02:00
Shahzad
d442213c0e
Fix ux/apm inspector panel (#116188)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-26 11:11:35 +01:00
mgiota
060bd41810
[RAC]: add experimental badge to alerts (#116090)
* [RAC]: add experimental badge to alerts

* combine feedback disclaimer into one text

* create a reusable AlertsDisclaimer component

* apend more details text to the apm alert

* fix failing i18n tests

* remove basePath from url

* fix failing unit tests

* fix unit tests

* add experimental to the alert annotation

* i18n for experimental text

* reuse ExperimentalBadge for the flyout and refactor AlertsDisclaimer
2021-10-26 10:55:51 +01:00
Lucca Miranda
8d195db519
chore: rename getApmHref to getLegacyApmHref (#115689)
* chore: rename getApmHref to getLegacyApmHref

* chore: lint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-26 11:01:26 +02:00
Deepak Sreekumar
2c5ecd9b3f
chore: rename functions in aggregated_transactions helper (#116001)
* Renamed methods and fixed imports

* Fixed lint errors

* Renamed file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-26 08:24:27 +02:00
Nathan L Smith
81264f73e9
Re-enable APM E2E tests and allow server to shut down cleanly on failure (#115450)
* Re-enable APM E2E tests and allow server to shut down cleanly on failure

Calling `process.exit` in the test script made it so the FTR runner would not properly shut down the server, and cause other tests to fail because Kibana was left running on a port. Remove that and just throw
instead.

No changes were made to the tests, as I was unable to reproduce any failures locally. I'll try in CI and see if we can get anything to fail.

Fixes #115280.
2021-10-25 14:05:15 -05:00
Cauê Marcondes
1732927fb1
adjusting charts timezone (#116014) 2021-10-25 11:13:40 -07:00
Giorgos Bamparopoulos
6b5b06fc03
Update APM linting dev doc with instructions about how to install the pre-commit hook and a link to the Kibana guide (#115924) 2021-10-25 10:24:00 +01:00
Cauê Marcondes
21878b5b54
[APM] Dark metadata icons on service overview page (#115964) 2021-10-21 15:43:22 -04:00
Josh Dover
91b5c980d8
[Fleet] Update beats tutorial descriptions for unified integrations (#115829)
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: DeDe Morton <dede.morton@elastic.co>
2021-10-21 19:51:40 +01:00
Matthew Kime
64f1dddcb0
[feature branch] index pattern => data view for user facing content (#109821)
* [index pattern management] index pattern => data view for user facing content (#109577)
2021-10-20 18:53:39 -05:00
Miriam
26a8d86b45
[APM] Enhancements errors list page (#115194)
* Add comparison to occurrences errors chart

* fix types

* Add errors rate chart

* Rename component and other PR review changes

* Subtitute noHits for fetch status

* Use status from correct request

* Improve types for comparisonType and comparisonEnable

* Move TimeRangeComparisonEnum to /runtime_types/comparison_type_rt

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-20 22:03:46 +02:00
Kyle Pollich
6d4cfc5e39
[Fleet] Add support for "Edit Package Policy" extensions using latest version of a package (#114914)
* Add support for extensions using latest version of a package and forcing upgrade state for edit policy view

* Fix isUpgrade flag on integrations UI version of edit page

* Treat non-validation errors as general failures in server and UI

* Fix tests + don't call upgrade API when saving

* fix i18n

* Fix default name always appearing when editing package policies via extension UI

* Opt security solution plugin out of new extension option

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-20 14:35:45 -04:00
Marco Vettorello
73566ad285
[charts] Replace usage of linear xScaleType in barchart [skip-ci] (#114778) 2021-10-20 14:03:45 +02:00
Søren Louv-Jansen
8fcfa79e73
Fix ESLint example (#115553) 2021-10-20 09:29:23 +01:00
Nathan L Smith
db53a79cc4
Waterfall layout and expansion fixes (#114889)
Fix according toggling behavior on trace waterfall. Previously clicking on any item would collapse the whole waterfall, now it just collapses the one you clicked on.

Truncate spans so ones with very long names don't overflow.

Make the left margin relative to the max level of depth so waterfalls with deep trees don't overflow.
2021-10-19 16:04:02 -05:00
Walter Rafelsberger
975beb125a
[ML] APM Correlations: Log log chart enhancements. (#113039)
- By clicking on a row in the analysis tables, the row gets selected/pinned as the one highlighted in the chart, allowing the user to investigate this particular result via hovering in the chart.
- A subtitle is added to the charts to clarify the chart type "Log-log plot for latency (x) by transactions (y) with overlapping bands" and lists the areas. Allows the user to see the full name of the highlighted entity because it could be cut off in the chart's native legend for longer field/value combinations.
- The area palette has been tweaked for higher contrasts, the error area color now matched the orange used in other charts for errors/failed transactions.
- Some visual tweaks like adding the non-transparent upper line for the areas to make sure there's a color in the chart itself that matches the legend colors:
- The trace samples tab now also shows an area with all failed transactions.
2021-10-19 13:59:01 -04:00
Cauê Marcondes
36d128c3e7
[APM] Default time range overrides fetched range for link-to/trace URLs without range parameters (#115449)
* removing default time range from link trace url

* adding test
2021-10-19 13:57:51 -04:00
Constance
498050e05b
Upgrade EUI to v39.1.1 (#114732)
* Upversion to EUI 39.1.0

* Update i18n_eui_mapping tokens

@see https://github.com/elastic/eui/blob/master/i18ntokens_changelog.json

* Merge refractor in yarn.lock

* Fix functional table filter selector

- Popover ID was removed in recent EUI a11y fix, so we're using child-position selection to target the Tags filter now

* Update snaphots

* Upgrade to 39.1.1 for extra bugfixes

* Update i18n mappings

* Fix i18n snapshot

* Attempt to harden flaky Security Cypress test

* More combobox entry hardening

- Got a flake on clicking the combobox dropdown on run 17/20 locally

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-19 09:15:38 -07:00
Caroline Horn
ec3809658f
[Unified Integrations] Clean up empty states, tutorial links and routing to prefer unified integrations (#114911)
Cleans up the integrations view and redirects all links to the integration manager.
2021-10-18 23:56:00 -04:00
Oliver Gupte
e673383584
[APM] APM-Fleet integration version check & upgrade message (#115297) 2021-10-18 19:58:35 -04:00
Cauê Marcondes
75048dc13b
[APM] Ensure APM deprecation documentationUrl point to correct doc branch (#115401)
* using branch in the url

* fixing TS
2021-10-18 19:53:20 -04:00
Walter Rafelsberger
62f057dee1
[ML] APM Correlations: Get trace samples tab overall distribution via APM endpoint. (#114615)
This creates an APM API endpoint that fetches data for the latency distribution chart in the trace samples tab on the transactions page. Previously, this data was fetched via the custom Kibana search strategies used for APM Correlations which causes issues in load balancing setups.
2021-10-19 00:12:07 +02:00
Quynh Nguyen
2a7ed2e718
[ML] Add context popover for APM latency correlations & failed transactions correlations (#113679)
* [ML] Add context popover, api tests, unit tests

* [ML] Add sample size context

* [ML] Fix translations

* [ML] Add tooltip

* [ML] Clean up & fix types

* [ML] Add spacer, fix popover button

* [ML] Add accented highlight, truncation, center alignment

* [ML] Bold texts

* Change color to primary, add tooltip

* Take out sample

* Update on add filter callback

* Refactor requests body

* Fix types, tests

* Fix include

* Remove isPopulatedObject completely

* Fix top values

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-18 10:01:23 -05:00
Shahzad
d08f091d4a
[Uptime] Added uptime query inspector panel (#115170) 2021-10-18 10:35:02 +02:00
Luke Elmers
94aa791a49
[Breaking] Remove deprecated enabled settings from plugins. (#113495) 2021-10-17 16:54:30 +01:00
Jonathan Budzenski
7d66002da2
Bump node to 16.11.1 (#110684)
* Bump node to ^16

* fix comment

* use jest timers

* bump mock-fs

* Fix core type errors

* Unskipping tests that work on my machine

* skip new unhandled promise rejection

* Fix Nodejs v16 regression due to https://github.com/nodejs/node/issues/38924

* Fix failing concurrent connections collector test

* Fix types after merge from master

* update servicenow test

* Skip unhandledRejection tests

* Skip tests with unhandled promise rejection

* Fix discover jest failures

* bump node to 16.11.1

* revert timeout increase

* skip unhandled promise rejection

* rm jest import

* skip unhandled promise rejection

Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Roes <tim.roes@elastic.co>
2021-10-16 16:21:58 -05:00
Søren Louv-Jansen
10103325b7
Update local_setup.md (#115169) 2021-10-15 14:19:47 -05:00
Nathan L Smith
07777b9de1
Re-enable and fix APM E2E tests (#114831)
* Re-enable previously disabled APM E2E tests.
* Round to the nearest second in `getComparisonTypes` to avoid cases where a millisecond difference can change which results get shown.
* Simplify error count alert tests to test the "happy path" (#79284 exists in order to expand to more tests for rule editing and creation.)
* Wait for alert list API request to complete before clicking "Create rule" button when running the test to create a rule from the Stack Management UI.

I ran the e2e tests 100 times locally with no failures so I'm confident the flakiness has been addressed.

Fixes #114419.
Fixes #109205.
2021-10-15 13:25:50 -05:00
Shahzad
72dcc4638b
[Exploratory view] Url filter wildcard (#114797) 2021-10-15 15:50:27 +02:00
Dario Gieselaar
fea50b37cd
[APM] Fix precommit script (#115150) 2021-10-15 14:33:15 +02:00
Giorgos Bamparopoulos
402550c165
Update APM Plugin Routing and Linking (#115008)
* Update client-side and server-side routing function names and files
2021-10-15 09:16:56 +01:00
Dario Gieselaar
008421f170
[APM] Revert multi-metric ML job. (#114961) 2021-10-15 09:33:06 +02:00
Cauê Marcondes
d7e7dbfe53
[APM] Remove rate aggregations (#114187)
* fixing throughput chart api

* change backends

* adding intervalString to the observability callback functions

* fixing transaction group detailed stats

* fixing tests

* fixing test

* fixing obs tests

* fixing tests

* adding tests

* fixing ci

* using data generator

* changing name

* fixing i18n

* updating opbs test to use data generator

* fixing api tests

* fixing tests

* using data generator to run the tests

* fixing tests

* fixing test
2021-10-14 20:48:15 +02:00
Quynh Nguyen
35da323313
[ML] Display advanced mode toggle for the APM failed transactions table (#114363)
* Add new toggle

* [ML] Add tooltip for p value

* [ML] Add tooltip for p value

* Update tooltip

* Add callback, revert i18n, compressed

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-14 13:17:55 -05:00
Walter Rafelsberger
b0daf935cf
[ML] APM Correlations: Round duration values to be used in range aggregations. (#114833)
A change in the ES range agg no longer accepts numbers with decimals if the underlying field is typed as long. This fixes the issue by rounding the values we pass on to the range agg.
2021-10-14 11:07:26 +02:00
Oliver Gupte
e5576d688d
[APM] Fixes incorrect index config names (#114901) (#114904) 2021-10-14 00:46:04 +02:00
Dario Gieselaar
eaf25d64e4
[APM] Generate breakdown metrics (#114390)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-13 19:48:01 +02:00
Dario Gieselaar
802fb0252d
[APM] Filter on tx metrics for instance stats (#114758) 2021-10-13 05:35:15 -04:00
Søren Louv-Jansen
5fdbd26229
[APM] Fix typo in linting docs (#114764) 2021-10-13 10:33:33 +02:00
Oliver Gupte
3d75154368
[APM] Removes the apm_oss plugin and deprecates related configs (#113364)
* [APM] Removes the apm_oss plugin and deprecates related configs (#108160)

* removes commented lines

* fixes typescript errors

* performs start up migration on the saved objects mapping for apm-indices

* removes all references to the deprecated apm_oss.* config paths in APM

* fixes missing bundle error

* fixes type error

* fixes eslint error with disabled rules

* fixes saved object mappings for es_archvices for tests

* fixes eslint error

* Updates default index values to include the more general apm-*. Fixes broken tests.

* removing unused configs from the config path migration: apm_oss.indexPattern and apm_oss.fleetMode

* - replaces full index configuration paths with references in the `xpack.apm.indices` namespace
- removes mergeConfig function and test

* fixes proxy mock object in unit test

* fixes linting issues

* PR feedback and failed test

* changes the configs at `xpack.apm.indices.*` from plural to singular to match `processor.event` values
2021-10-13 03:16:21 -04:00
Søren Louv-Jansen
169df02635
[APM] Improve readability of APM readme (#114633) 2021-10-12 20:34:13 -04:00
Bree Hall
a51545ecc3
Bumping EUI to 39.0.0 (#113633)
* Upgraded the version of EUI to 38.2.0 from 38.0.1

* Updated the i18n mappings required for EUI v.38.2.0

* Update i18n snapshots and resolve linting error

* Removed html_id_generator mocks.

Current mock was failing due to missing useGeneratedHtmlId export. This is safe to remove because EUI contains a .testenv that contains an mock for html_id_generator. More info at https://github.com/elastic/eui/blob/master/src/services/accessibility/html_id_generator.testenv.ts

* Resolve linting error in i18n mapping file

* Removed html_id_generator mocks.

Current mock was failing due to missing useGeneratedHtmlId export. This is safe to remove because EUI contains a .testenv that contains a mock for html_id_generator. More info at https://github.com/elastic/eui/blob/master/src/services/accessibility/html_id_generator.testenv.ts

* Update plugin snapshots

* Resolve merge conflict in license_checker config.ts file

* Upgrade EUI to version 39.0.0 from the original target (38.2.0) to handle an issue found with a functional test during the original upgrade

* Updated the i18n mapping for EUI v.39.0.0

* Update various snapshots to account for the an i18n translation token addition in EUI v. 39.0.0

* Updated test cases marked as obsolete by CI

* Update src/dev/license_checker/config.ts

Removing TODO comments from src/dev/license_checker/config.ts as they are no longer needed.

Co-authored-by: Constance <constancecchen@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Constance <constancecchen@users.noreply.github.com>
2021-10-12 17:11:04 -04:00
Caroline Horn
852634590d
[Design] Tutorial views cleanup (#114186)
* Move copy function to `isCopyable` on EuiCodeBlock
* Using EuiMarkdownFormat for Content
* Using KibanaPageTemplate for not found page
* Using KibanaPageTemplate for tutorial page and splitting into more panels
* Better spacing inside instruction_set
* Rendering Introduction as a EuiPageHeader
* Changed module notice “NOTE” to icon
* Moving tabs to the first set of content in an instructions set; Using EuiSplitPanel
* Changed fields button to a simple link
* Changed button group to wide, text colored, left-aligned set
2021-10-12 15:20:20 -04:00
Vadim Kibana
6a55f87da0
Connect locator persistable state to Short URLs (#114397) 2021-10-12 20:25:08 +02:00
Marco Vettorello
ff1b014c7b
Update dependency @elastic/charts to v37 (master) (#113968) 2021-10-12 16:36:18 +02:00
Søren Louv-Jansen
4f89393124
[APM] Add Table of contents to data model docs (#114608) 2021-10-12 14:37:50 +01:00
Nathan L Smith
c9e3e0e9b5
Fix GC time calculation (#113992)
Was in µs. Corrected to be in ms.

Also use correct duration formatting on the GC time chart and time spent by dependency chart.
2021-10-12 08:26:05 -05:00
Walter Rafelsberger
14cde79e83
[ML] APM Correlations: Show trace samples even when overall histogram chart fails to load. (#114247)
In the trace samples tab, the trace samples will not be shown if the overall histogram chart fails to load. This PR removes that limitation and will show the trace samples even when the chart fails to load.
2021-10-12 06:23:46 -04:00
Giorgos Bamparopoulos
b2108f4c2c
Add all APM configuration settings to the documentation (#114139)
* Add APM configuration settings to the documentation

* Rename  the deprecated apm_oss.* configurations to xpack.apm.*

* Remove new lines

* Add ess icon to config settings

* Add link to the APM configuration settings docs

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-11 11:53:49 +01:00