kibana/dev_docs/tutorials
Dzmitry Lemechko c48cc24617
[kbn/journeys] fixes to run journeys against ESS cluster (#166923)
## Summary

I had to change `waitForRender` since `page.waitForFunction` tries to
run a script on page and it is not working due to CSP settings on Cloud.
Instead of injecting a script, we use a classical API to find
elements/attributes in the DOM.

Since `PUT /internal/core/_settings` is merged in 8.11.0, journeys run
on Cloud with on-fly labels update is supported starting deployments
8.11.0+. I added error message for 404 code just in case someone runs it
on earlier version.

`many_fields_discover` journey was update since on Cloud the data view
used by scenario is not selected by default.

How it works:

Create a deployment with QAF and re-configure it for journey run:
```
export EC_DEPLOYMENT_NAME=my-run-8.11
qaf elastic-cloud deployments create --stack-version 8.11.0-SNAPSHOT --environment staging --region gcp-us-central1
qaf elastic-cloud deployments configure-for-performance-journeys
```

Run any journey, e.g. many_fields_discover
```
TEST_CLOUD=1 TEST_ES_URL=https://username:pswd@es_url:443 TEST_KIBANA_URL=https://username:pswd@kibana-ur_url node scripts/functional_test_runner --config x-pack/performance/journeys/many_fields_discover.ts
```

You should see a log about labels being updated:

```
Updating telemetry & APM labels: {"testJobId":"local-a3272047-6724-44d1-9a61-5c79781b06a1","testBuildId":"local-d8edbace-f441-4ba9-ac83-5909be3acf2a","journeyName":"many_fields_discover","ftrConfig":"x-pack/performance/journeys/many_fields_discover.ts"}
```

And then able to find APM logs for the journey in
[Ops](https://kibana-ops-e2e-perf.kb.us-central1.gcp.cloud.es.io:9243/app/apm/services?comparisonEnabled=true&environment=ENVIRONMENT_ALL&kuery=labels.testJobId%20%3A%20%22local-d79a878c-cc7a-423b-b884-c9b6b1a8d781%22&latencyAggregationType=avg&offset=1d&rangeFrom=now-24h%2Fh&rangeTo=now&serviceGroup=&transactionType=request)
cluster
2023-09-28 12:06:00 +02:00
..
data [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
performance [kbn/journeys] fixes to run journeys against ESS cluster (#166923) 2023-09-28 12:06:00 +02:00
advanced_settings.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
apm_ui.png Debugging with apm - fixes and tutorial (#127892) 2022-03-22 14:56:37 +02:00
building_a_kibana_distributable.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
ci.mdx [docs] Document how to build cloud images using labels (#163659) 2023-08-10 14:08:03 -07:00
data_views.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
debugging.mdx [APM Config] Allow API Key environment var (#163153) 2023-08-21 14:39:56 -07:00
development_windows.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
endpoints.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
expressions.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
kibana_page_template.mdx Upgrade EUI to v63.0.6 - updates to new EuiPageTemplate and deprecates old page components (#139524) 2022-09-07 15:35:23 -05:00
saved_objects.mdx [Migrations] Add support of deferred migrations (#153117) 2023-05-22 11:17:41 +02:00
screenshotting.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
submit_a_pull_request.mdx [api-docs] follow the correct schema for frontmatter (#138348) 2022-08-10 17:17:50 -05:00
testing_plugins.mdx Saved objects: improve typesafety (#140099) 2022-09-13 09:56:29 +02:00
versioning_http_apis.mdx [HTTP/Docs] Clarify versioning practices for internal vs public endpoints (#158828) 2023-06-02 13:40:42 +02:00
versioning_interfaces.mdx [Versioned APIs] Versioned interfaces dev docs guide (#150705) 2023-03-01 16:45:43 +01:00