Commit graph

98 commits

Author SHA1 Message Date
Spencer
7d77d39e1f
[ts] set allowJs to true by default (#144281)
* [ts] set allowJs to true by default

* fix scripts/check_ts_projects, original implementation is now wildly inefficient

* produce stats in check_ts_projects to make sure it's actually working

* fix imports
2022-11-01 15:26:44 -07:00
Giorgos Bamparopoulos
e3bf5539a1
[APM] Add e2e tests for storage explorer (#141959)
* Refactor APM user creation and add tests for storage explorer
2022-09-29 09:05:12 +01:00
Pierre Gayvallet
9579ea7235
Move src/core/types/elasticsearch to @kbn/es-types (#140522)
* create empty package

* move types to packages

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* start fixing imports

* fix more imports

* fix inline import

* add apm-ui as owners

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* fix new usages

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-20 10:32:13 +02:00
Katerina Patticha
9673ead47b
[APM] Display kubernetes metadata in service icons popup and node instance accordion (#139612)
* Extend endpoints to include containers metadata info

* Display kubernetes metadata in icons popover

* Display kubernetes metadata in node instance accordion

* Fix translations

* Fix types

* Fix unit tests

* Fix import order

* Update storybooks

* Hide labels if fields are empty

* Display OS field and remove labels

* CSS tweaks for aligning fields

* Clean up types

* Add API test for kubernetes metadata

* Reword showFilterByOption to isFilterable

* Use top_metrics aggs for kubernetes and container metadata

* Rename getMetricIndices to getInfraMetricIndices

* Fix lint errors

* Fetching metadata of specific container

* Clean up code

* Service metrics on inventory page

* specify size

* Clarify the type of metric

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-09-19 06:10:22 -07:00
Søren Louv-Jansen
9be0c883ed
[APM] Cypress: Enable data streams and refactor runner (#139322) 2022-08-24 21:51:34 +02:00
Spencer
9003353729
rename @elastic/* packages to @kbn/* (#138957)
* rename @elastic/* packages to @kbn/*

* update yarn.lock

* [CI] Auto-commit changed files from 'node scripts/generate packages_build_manifest'

* update lint task

* review feedback

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-18 08:54:42 -07:00
Søren Louv-Jansen
da908c70fe
[APM] Add -grep-files option to api test runner (#136937) 2022-07-26 14:22:45 +02:00
Spencer
a1c2220566
[checks] disable spinners in CI to cut-down on log sizes (#136341) 2022-07-13 23:37:39 -05:00
Søren Louv-Jansen
60e7f1dcd1
Rename viewer_user to viewer (#134294) 2022-06-22 20:39:18 +02:00
Justin Kambic
24312e7eda
[UX Dashboard] Make core web vitals test more reliable (#134401)
* Make core web vitals test more reliable.

* Remove strict numeric comparison from test.

* Fix regex string.

* Remove unneeded explicit timeout value.
2022-06-15 09:34:57 -07:00
Giorgos Bamparopoulos
0443b217a4
Fix API test script (#133308)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-01 18:40:15 +01:00
Søren Louv-Jansen
c1b77b93b6
[APM] Remove mentions of apm_user (#132790) 2022-05-25 12:07:00 +02:00
Katerina Patticha
a487d7c994
[APM] Add an internal endpoint for debugging telemetry (#132511)
* [APM] Add telemetry to service groups quries

* Add service groups in telemetry schema

* Add an internal route to test apm telemetry

* Update endpoint to run telemetry jobs and display data

* Update telemetry README

* Move service_groups task work to another PR

* Clean up

* Use versioned link in x-pack/plugins/apm/dev_docs/telemetry.md

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

* Update x-pack/plugins/apm/server/routes/debug_telemetry/route.ts

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

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-05-23 16:51:04 +02:00
Jonathan Budzenski
b191f141f3
Upgrade axios dependency (0.21.10.27.2). (#111655)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@elastic.co>
2022-05-12 11:49:52 +02:00
spalger
3730dd0779 fix all violations 2022-04-16 01:37:30 -05:00
Katerina Patticha
8022b0aba7
Add e2e for the apm integration policy form (#129860)
* Grant fleet privileges and capabilities to power user

* Add e2e for integration policy

* Fix selector for Tail-based

* Remove e2e releated to Fleet code

* Decouple tests

* Clean up assertion

* Fix flaky test
2022-04-12 19:44:37 +02:00
Cauê Marcondes
1bdae99180
[APM] fix error count e2e flaky test (#129755)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-11 08:19:43 -07:00
Cauê Marcondes
c5af4414e5
[APM] fixing rule anomaly API test (#129527)
* fixing api test

* removing unused code

* removing unused code

* fix

* fix
2022-04-07 07:30:20 +02:00
Spencer
2ad2a4c271
[eslint] ensure that all imports are resolvable (#129002) 2022-04-04 15:37:06 -04:00
Cauê Marcondes
4a76b11431
[APM] Transaction Duration Anomaly rule fires alerts for other detector types (#127973)
* adding detector filter

* removing console

* addressing pr comments

* pr changes

* fixing

* reverting

* fixing alerts rules and adding synthtrace sample

* renaming file

* using unit to check dates

* removing console

* removing synthtrace scenario

* api test

* creating api test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-01 12:19:59 +02:00
Cauê Marcondes
1e33587b68
[APM] fix cypress (#128411)
* Fix synthtrace, some broken tests

* fixing comparison test

* fixing error count e2e

* fixing error details test

* Fix APM deep links

* Add default environment to /apm/services request in home.spec.ts

* fixing service overview filter test

* Fix accessibility test in transactions overview page

* testing CI

* removing time arg

* removing unused import

* Fix e2e tests for infrastructure feature flag

* fixing and skipping tests

* fixing test

* skipping flaky test

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: gbamparop <georgios.bamparopoulos@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-29 12:16:32 -07:00
Giorgos Bamparopoulos
3704642366
Add inspect flag to api test script for debugging (#128275)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-28 11:27:40 +01:00
Dario Gieselaar
7f5e6c3d9f
[APM] Explicit return types for routes (#123266) 2022-01-25 03:28:56 -07:00
Shahzad
5ad36d2a93
[Exploratory view] Update index pattern permission error (#122680) 2022-01-18 15:52:49 +01:00
Søren Louv-Jansen
434f6e6a88
[APM] Remove index_pattern.json and add custom field formatters (#119915)
* [APM] Remove index_pattern.json and add custom field formatters

* Fix tests

* Fix tests

* Fix tutorial
2021-11-30 19:47:26 +01:00
Kate Patticha
e56627a26c
[APM] chore: Unify naming of 'apm/scripts/**/*' with snake_case (#118328)
* [APM] chore: Unify naming of 'apm/scripts/**/*' with snake_case

* Fix wrong path

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-16 06:27:36 +01:00
Søren Louv-Jansen
2e35260012
[APM] E2E script improvements (#116972) 2021-11-04 14:05:54 +00:00
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
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
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
Shahzad
d08f091d4a
[Uptime] Added uptime query inspector panel (#115170) 2021-10-18 10:35:02 +02:00
Dario Gieselaar
fea50b37cd
[APM] Fix precommit script (#115150) 2021-10-15 14:33:15 +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
Dario Gieselaar
6aade8f0eb
[APM] Ensure refresh button works (#112652)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-06 13:03:09 +02:00
Tyler Smalley
4681a80317
[DX] Upgrade prettier to v2.4.0 (#112359)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-09-19 22:34:30 -07:00
Cauê Marcondes
2711e7b1cc
Removing old e2e (#112170)
* removing old e2e

* removing e2e

* removing e2e

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-15 16:33:54 -04:00
Søren Louv-Jansen
d3f6303014
[APM] Show badge for failed spans in waterfall (#109812)
Co-authored-by: Casper Hübertz <casper@formgeist.com>
2021-09-08 23:37:28 +02:00
Søren Louv-Jansen
61e533f253
[APM] Clean up readme (#110973)
* [APM] Clean up readme

* Update linting.md

* Update testing.md

* Update testing.md

* Update testing.md

* Update plugin-list.asciidoc

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-05 07:14:06 +02:00
Cauê Marcondes
2fe56f9793
[APM] tests restructure (#110703)
* refactoring test

* improving test structure

* improvements

* improving readmes

* readme

* test

* fixing ts issue

* addressing pr comments

* fixing readme files

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-01 16:42:33 -04:00
Søren Louv-Jansen
a93a7efa80
[APM] Refactor Cypress e2e tests (#109024)
* Improve script to setup users and roles

* fix readme

* CI fixes

* add index permissions to roles

* disable welcome screen

* Run es archive once before tests

* Fix ts issues

* Update x-pack/plugins/apm/readme.md

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
2021-08-19 16:46:25 +02:00
Dario Gieselaar
a474a63a7f
[APM] Make environment & kuery required (#108338) 2021-08-13 09:50:14 -04:00
Cauê Marcondes
40842e1d65
[APM] Removing loading spinner while fetching comparison data from tables (#108256)
* removing loading from tables

* renaiming readme file

* changing apm readme file

* addressing PR comments
2021-08-12 12:16:09 -04:00
Cauê Marcondes
6ed4b4f70c
[APM] Add new ftr_e2e to kibana CI and remove current e2e tests. (#107593) 2021-08-10 23:40:20 -04:00
Dario Gieselaar
66b951c07c
[APM] Use 7.x compatible archive for API tests (#107367) 2021-08-03 06:29:06 -04:00
Dario Gieselaar
0d5d453af2
[APM] Update ES archive for tests (#106837) 2021-07-27 14:16:03 -04:00
Dario Gieselaar
821aeb1ff4
[APM] Typed client-side routing (#104274)
* [APM] @kbn/typed-router-config

* [APM] typed route config

* Breadcrumbs, wildcards

* Migrate settings, home

* Migrate part of service detail page

* Migrate remaining routes, tests

* Set maxWorkers for precommit script to 4

* Add jest types to tsconfigs

* Make sure transaction distribution data is fetched

* Fix typescript errors

* Remove usage of react-router's useParams

* Add route() utility function

* Don't use ApmServiceContext for alert flyouts

* Don't add onClick handler for breadcrumb

* Clarify ts-ignore

* Remove unused things

* Update documentation

* Use useServiceName() in ServiceMap component
2021-07-15 11:30:59 +02:00
Dario Gieselaar
02033e2b4b
Move ES aggregation types to src/core (#102597) 2021-06-21 11:11:15 +01:00
Mikhail Shustov
d920682e4e
Update @elastic/elasticsearch to 8.0.0-canary13 (#98266)
* bump @elastic/elasticsearch to canary.7

* address errors in core

* address errors in data plugin

* address errors in Alerting team plugins

* remove outdated messages in Lens

* remove unnecessary comments in ML

* address errors in Observability plugin

* address errors in reporting plugin

* address errors in Rule registry plugin

* fix errors in Security plugins

* fix errors in ES-UI plugin

* remove unnecessary union.

* update core tests

* fix kbn-es-archiver

* update to canary 8

* bump to v9

* use new typings

* fix new errors in core

* fix errors in core typeings

* fix type errors in data plugin

* fix type errors in telemetray plugin

* fix data plugin tests

* fix search examples type error

* fix errors in discover plugin

* fix errors in index_pattern_management

* fix type errors in vis_type_*

* fix errors in typings/elasticsearch

* fix type errors in actions plugin

* fix type errors in alerting and apm plugins

* fix type errors in canvas and cases

* fix errors in event_log

* fix type errors in ILM and ingest_pipelines

* fix errors in lens plugin

* fix errors in lists plugin

* fix errors in logstash

* fix errors in metrics_entities

* fix errors in o11y

* fix errors in watcher

* fix errors in uptime

* fix errors in upgrade_assistant

* fix errors in task_manager

* fix errors in stack_alerts

* fix errors in security_solution

* fix errors in rule_registry

* fix errors in snapshot_restore

* fix remaining errors

* fix search intergration tests

* adjust assetion

* bump version to canary.10

* adapt code to new naming schema

* use mapping types provided by the client library

* Revert "adjust assetion"

This reverts commit 19b8fe0464.

* fix so intergration tests

* fix http integration tests

* bump version to canary 11

* fix login test

* fix http integration test

* fix apm test

* update docs

* fixing some ml types

* fix new errors in data plugin

* fix new errors in alerting plugin

* fix new errors in lists plugin

* fix new errors in reporting

* fix or mute errors in rule_registry plugin

* more ML type fixes

* bump to canary 12

* fix errors after merge conflict

* additional ML fixes

* bump to canary 13

* fix errors in apm plugin

* fix errors in fleet plugin

* fix errors in infra plugin

* fix errors in monitoring plugin

* fix errors in osquery plugin

* fix errors in security solution plugins

* fix errors in transform plugin

* Update type imports for ES

* fix errors in x-pack plugins

* fix errors in tests

* update docs

* fix errors in x-pack/test

* update error description

* fix errors after master merge

* update comment in infra plugin

* fix new errors on xpack tests/

Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2021-06-08 15:06:06 +02:00
Dario Gieselaar
5bb9eecd26
[RAC] Populate Observability alerts table with data from alerts indices (#96692)
* Set up Observability rule APIs

* Populate alerts table with data from API

* Move field map types/utils to common

* Format reason/link in alert type

* Format reason/link in alert type

* Fix issues with tsconfigs

* Storybook cleanup for example alerts

* Use `MemoryRouter` in the stories and `useHistory` in the component to get the history
* Replace examples with ones from "real" data
* Use `() => {}` instead of `jest.fn()` in mock registry data

* Store/display evaluations, add active/recovered badge

* Some more story fixes

* Decode rule data with type from owning registry

* Use transaction type/environment in link to app

* Fix type issues

* Fix API tests

* Undo changes in task_runner.ts

* Remove Mutable<> wrappers for field map

* Remove logger.debug calls in alerting es client

* Add API test for recovery of alerts

* Revert changes to src/core/server/http/router

* Use type imports where possible

* Update limits

* Set limit to 100kb

Co-authored-by: Nathan L Smith <smith@nlsmith.com>
2021-04-15 18:25:50 +02:00
Dario Gieselaar
dfaf3ac8f5
[RAC] Rule registry plugin (#95903)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-09 10:35:44 +02:00