Commit graph

226 commits

Author SHA1 Message Date
Cauê Marcondes
4eca663c08
[APM] Error distribution chart comparison label and layout fix (#117004)
* fixing bucket size when no data available

* fixing layout

* removing import

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-02 14:34:22 +00:00
Miriam
c7b53f16b7
[APM] Apm errors api tests (#116764)
* changes after review

* move file to errors folder
2021-11-02 12:25:17 +00:00
Miriam
95cadcc9f1
Replace noHits variable (#116438)
* Replace noHits variable

* fix types

* changes after review
2021-11-02 10:10:24 +00:00
Tyler Smalley
2a95b16c02 Revert "[APM] Adding api tests for error group (#116771)"
This reverts commit f2402cef37.
2021-11-01 12:36:38 -07:00
Dario Gieselaar
2c887539d5
[APM] Synthtrace ES Client (#116770)
Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2021-11-01 18:19:29 +00:00
Cauê Marcondes
f2402cef37
[APM] Adding api tests for error group (#116771)
* adding api tests for error group

* addresing pr changes
2021-11-01 16:31:06 +00:00
Giorgos Bamparopoulos
4feeeeb34f
Add API tests for top dependencies (#116788)
* Add top dependencies API tests

Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
2021-11-01 16:22:01 +00:00
Giorgos Bamparopoulos
ab092300f6
Add API tests for dependencies metadata (#116648)
* Add API tests for dependencies metadata

* Rename metadata tests to event metadata

Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>
2021-11-01 12:40:09 +00:00
Cauê Marcondes
7130d6eb45
[APM] Api tests for Error distribution api (#116674)
* adding tests for error distribution

* addressing pr changes

* addressing pr comments

* fixing ts issues
2021-10-29 21:57:08 +01:00
Cauê Marcondes
155a16ed2f
[APM] Errors api test: error_groups/main_statistics (#116337)
* use apmApiClient

* refacroting

* fixing errors groups main statistics tests

* refactoring

* fixing error group detailed stats test

* fixing ts issue

* renaming empty archiver
2021-10-28 16:20:51 +01:00
Giorgos Bamparopoulos
dc77c89e84
Update dependencies overview route to use backendName as a query param (#115226)
* Update dependencies overview route to use backendName as a query param

* Remove backendName from context

* Move backendMetadataFetch call to the place that is used and remove ApmBackendContext

* Update API routes and tests

* Add redirect from the old route
2021-10-26 16:35:08 +01:00
Cauê Marcondes
06fbfd91f6
[APM] Fix Service maps api test (#116218)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-26 16:10:17 +01: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
Søren Louv-Jansen
2dba0d18f1
[APM] Rename traceData to synthtraceEsClient (#116215) 2021-10-26 02:20:15 +01:00
Søren Louv-Jansen
51f8feaea0
Rename apm-generator to apm-synthtrace (#116075) 2021-10-25 16:25:01 -04:00
Dario Gieselaar
110a8418f9
[APM] Add live mode to synthtrace (#115988) 2021-10-23 23:54:21 +02:00
Luke Elmers
a7fff86390
[saved objects] Remove migrations enableV2 config. (#115655) 2021-10-20 09:17:52 -06: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
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
Cauê Marcondes
4dcb09df59
[APM] Adding error rate tests (#115190) 2021-10-18 20:52:01 +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
Cauê Marcondes
6abfcdd572
[APM] Adding latency api tests (#115224)
* adding latency test

* addint api tests for latency calc
2021-10-15 14:07:02 -05: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
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
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
Nathan L Smith
02822a66fa
Relocate internal APM API endpoints to /internal (#114196)
All endpoints except annotations, source maps, and agent configuration are now at /internal/apm instead of /api/apm.

None of the UX endpoints have been updated, only APM.

If you search for "/api/apm" in the codebase, you should only see the above endpoints.

Fixes #113383.
2021-10-07 19:11:20 -05:00
Dario Gieselaar
ea160a5072
[APM] Trace generation library (#113764) 2021-10-07 13:04:00 +02:00
Dario Gieselaar
79f841e5d3
[APM] Display all properties by default in flyout (#113221)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-05 13:38:51 +02:00
Nathan L Smith
f4a95f9b97
Alert creation and freeform selection (#111883)
Allow selecting any service name, transaction type (where appropriate), and environment when creating and editing rules, both in APM and Stack Management.

- Create /internal/apm/suggestions endpoint that uses `terms_enum`
- Use combo box for environment, service name, and transaction type with suggestions endpoint on all alerts
- Remove "Go to APM" callouts on new alert creation
- Wrap calls to `createCallApmApi` in alert triggers with `useEffect`
- Use `getEnvironmentLabel` for value in environment field expression
- Make all `AlertParams` fields optional (except in latency threshold alert)
- Add e2e tests for creating an alert
- Remove `NewAlertEmptyPrompt` component and `isNewApmRuleFromStackManagement` helper
- Replace `maxServiceEnvironments` and `maxServiceSelections` config options with `maxSuggestions` advanced setting.


![CleanShot 2021-09-28 at 10 35 58](https://user-images.githubusercontent.com/9912/135119948-e247615a-d235-4feb-b197-b803f165ad1e.gif)

Fixes #106786
2021-09-29 11:18:44 -05:00
Walter Rafelsberger
f4c164c69b
[ML] APM Correlations: Remove unused code. (#112645)
- Removes CustomFields component.
- Removes fetchTransactionDurationHistogramInterval query.
- Removes unused legacy API endpoints used for the correlations feature.
2021-09-23 11:38:04 +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
Walter Rafelsberger
065701a0c3
[ML] APM Correlations: Chart for failed transactions correlations tab. (#110172)
* [ML] Fix tooltip text.

* Revert "[ML] Fix tooltip text."

This reverts commit ca86f769d7.

* [ML] Chart prototype.

* [ML] Hover support for failed transactions chart.

* [ML] Add p-value column.

* [ML] Code consolidation.

* [ML] Fix naming inconsistencies.

* [ML] Fix naming inconsistencies.

* [ML] Fix naming inconsistencies.

* [ML] Consolidate hooks.

* [ML] Consolidate hooks.

* [ML] Consolidate hooks.

* [ML] Use function overloads.

* [ML] Fix naming inconsistencies.

* [ML] Fix jest test.

* [ML] Fix chart loading behavior.

* [ML] Rename values to latencyCorrelations.

* [ML] Clean up types.

* [ML] Add function overloads.

* [Ml] Update API integration tests.

* [ML] Rename values to failedTransactionsCorrelations.

* [ML] Fix naming inconsistencies.

* [ML] Fix naming inconsistencies.

* [ML] Fix naming inconsistencies.

* [ML] Fix jest test.

* [ML] Fix API integration test

* [ML] Clean up chart data.

* [ML] Fix chart props.

* [ML] Tweak types for failed correlations.

* [ML] Improve FieldValuePair type usage.

* [ML] Remove 'async' from variable names.

* [ML] Fix typo.

* [ML] Simplify mock.

* [ML] Refactor code that used type guards.

* [ML] Comment about feature availability.

* [ML] Simplify check.

* [ML] Simplify selectedHistogram.

* [ML] Improve column type safety.

* [ML] Simplify selectedTerm.

* [ML] Simplify sorting.

* [ML] Fix regresssion when there's no data for failed transactions.

* [ML] Rename fieldFilter to termFilters.

* [ML] Update api integration test assertions.

* [ML] Fix failed transactions params.

* [ML] Tweak chart title.

* [ML] Tweak chart colors.

* [ML] Add translation.

* [ML] Tweak selectedTerm if statement.

* [ML] Fix types.

* [ML] Fix assertion text.

* [ML] Refactor replaceHistogramDotsWithBars.

* [ML] Refactor fetchFailedTransactionsCorrelationPValues.

* [ML] Fix score column width.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-13 17:08:43 +01:00
Cauê Marcondes
c51c92cd7a
[APM] Fix bucket size in alert previews (#111304)
* fixing preview charts

* using metrics

* fixing ts issues

* refactoring

* refactoring useServiceTransactionTypesFetcher

* addressing pr comments

* addressing pr comments

* addressing pr comments
2021-09-09 12:57:29 -04:00
Cauê Marcondes
6e9b1b57b8
[APM] Consistent "no data" screen with other Observability solutions (#111630)
* logic to show no data screen

* fixing i18n

* fixing ts

* addressing pr comments
2021-09-09 12:55:28 -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
Walter Rafelsberger
28af11a601
[ML] APM Correlations: Fix API integration tests. (#111532)
A bugfix for significant terms on the ES side resulted in changes to assertions we have for api integration tests for APM correlations. This PR updates the affected tests.
2021-09-08 21:33:16 +02:00
Walter Rafelsberger
f1fbe8e06d
[ML] APM Latency Correlations: Code consolidation. (#110790)
Code deduplication:
- combine 3 existing client side hooks into useSearchStrategy
- combine server side multiple search strategy files into shared search_strategy_provider.ts
- Clarified naming (client/server params, strategy naming etc.), improved types.
- None of the actual deeper internal logic changed, larger chunks of code that show up as new lines is mostly just moved code + additional types (e.g. function overloads) to support the different search strategies with the same server side code and client side hook.
2021-09-08 09:47:07 +02:00
Søren Louv-Jansen
c7394591cc
[APM] Mark old api test client as legacy (#110974)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-07 00:39:45 +02:00
Marshall Main
f58865c1f5
[Rule Registry][RAC] Rename kibana.alert.id to kibana.alert.instance.id (#110528)
* Rename kibana.alert.id to kibana.alert.instance.id

* Update test snapshot

* Fix test

* One more fix
2021-09-01 16:56:49 -04:00
Nathan L Smith
3bae4cdc06
Add inspector panel for APM routes (#109696)
When the observability:enableInspectEsQueries advanced setting is enabled, show an inspector that includes all queries through useFetcher.

Remove the callout.
2021-08-31 11:10:54 -05:00
Felix Stürmer
137c182761
[RAC] Populate common rule fields in alert helpers (#108679)
Co-authored-by: mgiota <panagiota.mitsopoulou@elastic.co>
2021-08-26 09:19:51 -04:00
Georgii Gorbachev
a299604c58
[RAC][Rule Registry] Implement versioning and backing indices (#109276)
**Ticket:** https://github.com/elastic/kibana/issues/109293

🚨 **This PR is critical for Observability 7.15** 🚨

## Summary

This PR fixes the indexing implementation in `rule_registry`. It implements the suggestions for backwards compatibility described in the ticket:

- changes the naming scheme and introduces the concept of "backing indices", so that names of the concrete ("backing") indices != names of their aliases
- adds versioning based on the current Kibana version

TODO:

- [x] Change index naming (implement the concept of backing indices)
- [x] Include Kibana version into the index template metadata
- [x] Include Kibana version into the document fields
- [x] Remove `version` from `IndexOptions` (parameters provided by solutions/plugins when initializing alerts-as-data indices)
- [x] Fix CI

### Checklist

- [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
- [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
2021-08-25 19:54:25 +02:00
Devin W. Hurley
2fea917330
[RAC] [APM] removes hardcoded alerts as data index from apm integration test (#109715)
* removes hardcoded index from apm integration tests

* adds integration tests for rule registry's get index route

* more cleanup

* fail try-catch if response is not empty, adds comments as to why index refresh catch block is empty
2021-08-25 19:07:40 +02:00
Tiago Costa
25cf47bac8
skip failing es promotion suites (#109703) 2021-08-23 18:13:06 +01:00
Tiago Costa
c736d99c87
skip failing es promotion suite (#109660) 2021-08-23 15:18:00 +01:00
Quynh Nguyen
63ef9d10b0
[ML] Fix UI inconsistencies in APM Failed transaction correlations (#109187)
- Show the same empty state in the correlations table
- Add "Correlations" title above the table
- Add EuiSpacer between the sections before and after progress
- Update the copy within the beta badge title=Failed transaction correlations description=Failed transaction correlations is not GA...
- Remove s size from the beta badge
- Move the help popover to the top of the panel (similar to the Latency correlations tab)
- Move the Cancel/Refresh option to the right of the progress bar (similar to the Latency correlations tab)
- When the correlation job is running the correlations tab should show a loading state similar to the latency correlations table
- Indicate in the table headers Score is sorted by default
- Add sortability to both Latency and failed transactions correlations table
- Refactor to prevent duplicate code/components like Log, progress bar
- Fix alignments of the tab content header (previously navigating from one Trace samples tab to Latency correlation tabs will cause a minor jump in the header, or the titles within the same tab were not the same size )
- Remove the event.outcome as a field candidate (because event.outcome: failure would always be significant in this case)
- Shrink the column width for impact (previously it was at 116px)
- Added badge for High, medium, low [APM] Correlations: Show impact levels (high, medium, low) as colored badges indicating their severity
- Fix license prompt text
- Functional tests for the new tab
- Make the p value & error rate columns visible only when esInspect mode is enabled
2021-08-23 07:28:18 -04:00
Tiago Costa
eb08603a00
skip failing es promotion suites (#109583) 2021-08-23 00:21:24 +01:00
Alejandro Fernández Gómez
5fd903b7fe
[RAC] Enable workflow status filtering (#108215)
Co-authored-by: Jason Rhodes <jason.matthew.rhodes@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-20 12:07:09 +02:00
Cauê Marcondes
338577a01c
[APM] Enable JVM metrics for the Ruby Agent running on a JVM (jRuby) (#108933)
* showing JVM when jruby

* return empty when there's no hits

* renaming
2021-08-17 19:06:35 -04:00
Walter Rafelsberger
d07f7a5d5e
[ML] Move APM Latency Correlations from flyout to transactions page. (#107266)
- Moves APM Latency Correlations from flyout to transactions page.
- Introduces a tab based navigation for `Trace samples` / `Latency correlations` / `Failed transactions correlations`
- For trace samples, the previous low detailed histogram chart gets replaced with the new log log based histogram chart. Users can drag select a range of lantency to filter trace samples.
- Removes code related to the previous distribution chart. Renames `useTransactionDistributionFetcher` to `useTransactionTraceSamplesFetcher`. Instead of a histogram with top hits, this will now just return a sample of traces for the given filters.
2021-08-17 11:15:44 -04:00