Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.12] [kbn/journeys] fix hanging on telemetry call & improve log…
…ging (elastic#175194) (elastic#175247) # Backport This will backport the following commits from `main` to `8.12`: - [[kbn/journeys] fix hanging on telemetry call & improve logging (elastic#175194)](elastic#175194) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Dzmitry Lemechko","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-01-22T17:18:10Z","message":"[kbn/journeys] fix hanging on telemetry call & improve logging (elastic#175194)\n\n## Summary\r\n\r\nThis PR fixes the issue causing (mostly) [login\r\njourney](https://buildkite.com/elastic/kibana-single-user-performance/builds/12398#018d1149-cc2e-4591-a61c-176768081e2c)\r\nstuck for 14 min waiting for Telemetry call response.\r\n\r\n\r\n<img width=\"964\" alt=\"Screenshot 2024-01-22 at 11 12 24\"\r\nsrc=\"https://github.com/elastic/kibana/assets/10977896/8cadc2ec-ee84-42f6-8a0c-ad949367429c\">\r\n\r\nI believe the issue was in how we handle the Observables for request\r\nevents. I added extra comment in the particular code change.\r\n\r\nI no longer can reproduce it, all the events are reported correctly:\r\n<img width=\"964\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/10977896/fa2c4b27-dcf2-480b-a07f-aeb23045149a\">\r\n\r\nLogs cleaning is to log in console only performance metrics event but\r\nnot all EBT elements. Also not to report some browser errors that not\r\nKibana specific.\r\n\r\n\r\nTesting:\r\n\r\nrun the following script 3-4 times\r\n```\r\nPERFORMANCE_ENABLE_TELEMETRY=1 node scripts/run_performance.js --journey-path x-pack/performance/journeys/login.ts\r\n```\r\n\r\n- script is completed without delays (e.g. doesn't hang on after hook in\r\nTEST phase)\r\n- telemetry requests are logged with correct counter and all finished,\r\ne.g. `Waiting for telemetry request #2 to complete` is followed by\r\n`Telemetry request #2 complete`\r\n- only events started with `Report event \"performance_metric\"` are in\r\nconsole output","sha":"8be528efb3169b630f44b33912adaf63bdea2a25","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.12.1","v8.13.0"],"title":"[kbn/journeys] fix hanging on telemetry call & improve logging","number":175194,"url":"https://github.com/elastic/kibana/pull/175194","mergeCommit":{"message":"[kbn/journeys] fix hanging on telemetry call & improve logging (elastic#175194)\n\n## Summary\r\n\r\nThis PR fixes the issue causing (mostly) [login\r\njourney](https://buildkite.com/elastic/kibana-single-user-performance/builds/12398#018d1149-cc2e-4591-a61c-176768081e2c)\r\nstuck for 14 min waiting for Telemetry call response.\r\n\r\n\r\n<img width=\"964\" alt=\"Screenshot 2024-01-22 at 11 12 24\"\r\nsrc=\"https://github.com/elastic/kibana/assets/10977896/8cadc2ec-ee84-42f6-8a0c-ad949367429c\">\r\n\r\nI believe the issue was in how we handle the Observables for request\r\nevents. I added extra comment in the particular code change.\r\n\r\nI no longer can reproduce it, all the events are reported correctly:\r\n<img width=\"964\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/10977896/fa2c4b27-dcf2-480b-a07f-aeb23045149a\">\r\n\r\nLogs cleaning is to log in console only performance metrics event but\r\nnot all EBT elements. Also not to report some browser errors that not\r\nKibana specific.\r\n\r\n\r\nTesting:\r\n\r\nrun the following script 3-4 times\r\n```\r\nPERFORMANCE_ENABLE_TELEMETRY=1 node scripts/run_performance.js --journey-path x-pack/performance/journeys/login.ts\r\n```\r\n\r\n- script is completed without delays (e.g. doesn't hang on after hook in\r\nTEST phase)\r\n- telemetry requests are logged with correct counter and all finished,\r\ne.g. `Waiting for telemetry request #2 to complete` is followed by\r\n`Telemetry request #2 complete`\r\n- only events started with `Report event \"performance_metric\"` are in\r\nconsole output","sha":"8be528efb3169b630f44b33912adaf63bdea2a25"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/175194","number":175194,"mergeCommit":{"message":"[kbn/journeys] fix hanging on telemetry call & improve logging (elastic#175194)\n\n## Summary\r\n\r\nThis PR fixes the issue causing (mostly) [login\r\njourney](https://buildkite.com/elastic/kibana-single-user-performance/builds/12398#018d1149-cc2e-4591-a61c-176768081e2c)\r\nstuck for 14 min waiting for Telemetry call response.\r\n\r\n\r\n<img width=\"964\" alt=\"Screenshot 2024-01-22 at 11 12 24\"\r\nsrc=\"https://github.com/elastic/kibana/assets/10977896/8cadc2ec-ee84-42f6-8a0c-ad949367429c\">\r\n\r\nI believe the issue was in how we handle the Observables for request\r\nevents. I added extra comment in the particular code change.\r\n\r\nI no longer can reproduce it, all the events are reported correctly:\r\n<img width=\"964\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/10977896/fa2c4b27-dcf2-480b-a07f-aeb23045149a\">\r\n\r\nLogs cleaning is to log in console only performance metrics event but\r\nnot all EBT elements. Also not to report some browser errors that not\r\nKibana specific.\r\n\r\n\r\nTesting:\r\n\r\nrun the following script 3-4 times\r\n```\r\nPERFORMANCE_ENABLE_TELEMETRY=1 node scripts/run_performance.js --journey-path x-pack/performance/journeys/login.ts\r\n```\r\n\r\n- script is completed without delays (e.g. doesn't hang on after hook in\r\nTEST phase)\r\n- telemetry requests are logged with correct counter and all finished,\r\ne.g. `Waiting for telemetry request #2 to complete` is followed by\r\n`Telemetry request #2 complete`\r\n- only events started with `Report event \"performance_metric\"` are in\r\nconsole output","sha":"8be528efb3169b630f44b33912adaf63bdea2a25"}}]}] BACKPORT--> Co-authored-by: Dzmitry Lemechko <[email protected]>
- Loading branch information