[Oblt Onboarding] Add more errors logging for Auto Detect flow#222948
Conversation
|
/oblt-deploy |
| printf "\e[32;1m✓\e[0m %s\n" "Elastic Agent downloaded to $(pwd)/$elastic_agent_artifact_name.tar.gz" | ||
| update_step_progress "ea-download" "complete" | ||
| else | ||
| update_step_progress "ea-download" "danger" "Failed to download Elastic Agent, see script output for error." |
There was a problem hiding this comment.
I've removed see script output for error from everywhere as we don't show these messages to the user anymore, this was a leftover from the legacy onboarding.
…errors-during-auto-detect-flow
|
/oblt-deploy |
…errors-during-auto-detect-flow
…errors-during-auto-detect-flow
|
/oblt-deploy |
…errors-during-auto-detect-flow
flash1293
left a comment
There was a problem hiding this comment.
Sorry it took a while to get to this.
Tested this locally and it mostly works, only issue I noticed is if the captured error is multi-line it breaks the JSON of the request body for tracking, so it never arrives. Would be great if we could fix that.
| else | ||
| update_step_progress "ea-extract" "danger" "Failed to extract Elastic Agent, see script output for error." | ||
| fail "Failed to extract Elastic Agent" | ||
| update_step_progress "ea-extract" "danger" "Failed to extract Elastic Agent.\nTar Error: $agent_extract_result" |
There was a problem hiding this comment.
I tried that and it didn't report successfully, I think because a multiline output broke the JSON payload:
0000: {"status":"danger", "message":"Failed to extract Elastic Agent.\
0040: nTar Error: tar: Option --myabc is not supported.Usage:. List:
0080: tar -tf <archive-filename>. Extract: tar -xf <archive-filena
00c0: me>. Create: tar -cf <archive-filename> [filenames...]. Help:
0100: tar --help"}
There was a problem hiding this comment.
Ah, thank you for catching this! I've added escaping for newline and backslashes to the MESSAGE.
…ing-add-more-logging-for-errors-during-auto-detect-flow
…errors-during-auto-detect-flow
|
Tested this on macos and it doesn't seem to fully work: There are a bunch of errors related to sed and I still get the 400 error. This is how I test:
|
😢 I only tested on linux, makes sense... will be back with the fix |
…ing-add-more-logging-for-errors-during-auto-detect-flow
|
@flash1293 I abandoned the idea of trying to escape the error messages and replaced it with base64 encoding. This should be more robust approach. Please give it another try, I've tested on mac and linux and everything seems to work fine. |
|
/oblt-deploy |
|
Couldn't break it anymore locally, but I would like to do a proper e2e test from a serverless instance first and also it seems like we need t fix some unit tests anyway. Even if FF has already passed I think we should backport this because this kind of telemetry is very important. |
…errors-during-auto-detect-flow
flash1293
left a comment
There was a problem hiding this comment.
Tested and seems to work fine, LGTM.
Just to make sure, is POST /internal/observability_onboarding/flow/{id}/step/{name} called from somewhere else? I didn't find anything but maybe I missed it.
it was used on the FE before but now it's only called from the bash script |
|
Starting backport for target branches: 8.19, 9.0 https://github.com/elastic/kibana/actions/runs/15903200246 |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
…ic#222948) Closes elastic#218433 This change adds more descriptive error messages inside telemetry events in the auto detect onboarding flow. The extended error message be shown to the user as well. * New telemetry event for the case when user is not running the script as `root` * If Agent fails to download, bot the original error from `curl` and the download URL will be logged * If Agent fails to extract, error message from `tar` command will be logged * If Agent fails to install, error message from `elastic-agent install` command will be logged * Error response from the integrations install endpoint will be logged Example telemetry event:  Example terminal output:  ## How to test In order to simulate errors for all scenarios, you going to need to modify the `auto_detect.sh` script to make it intentionally fail, like adding extra character to the EA download URL. You can modify it directly in the source if you're running Kibana locally, or you can modify it after it was downloaded and before running it. To test just one use-case without the script manipulations, you can modify the EA download URL inside the code snippet provided by Kibana. **Whatever way you choose, still go though the flow and make sure the successful path works as expected.** You can check the telemetry events emitted from the flow on [the staging telemetry cluster](https://telemetry-v2-staging.elastic.dev/s/observability-ux/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),dataSource:(dataViewId:b4befdd3-9a15-40c2-be4d-3ac1084d6182,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'event_type%20:%20%22observability_onboarding%22'),sort:!(!('@timestamp',desc)))), but keep in mind that events delivered there with a delay of a couple of hours 😢 --------- Co-authored-by: Joe Reuter <johannes.reuter@elastic.co> (cherry picked from commit 6b452c7)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…ic#222948) Closes elastic#218433 This change adds more descriptive error messages inside telemetry events in the auto detect onboarding flow. The extended error message be shown to the user as well. * New telemetry event for the case when user is not running the script as `root` * If Agent fails to download, bot the original error from `curl` and the download URL will be logged * If Agent fails to extract, error message from `tar` command will be logged * If Agent fails to install, error message from `elastic-agent install` command will be logged * Error response from the integrations install endpoint will be logged Example telemetry event:  Example terminal output:  ## How to test In order to simulate errors for all scenarios, you going to need to modify the `auto_detect.sh` script to make it intentionally fail, like adding extra character to the EA download URL. You can modify it directly in the source if you're running Kibana locally, or you can modify it after it was downloaded and before running it. To test just one use-case without the script manipulations, you can modify the EA download URL inside the code snippet provided by Kibana. **Whatever way you choose, still go though the flow and make sure the successful path works as expected.** You can check the telemetry events emitted from the flow on [the staging telemetry cluster](https://telemetry-v2-staging.elastic.dev/s/observability-ux/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),dataSource:(dataViewId:b4befdd3-9a15-40c2-be4d-3ac1084d6182,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'event_type%20:%20%22observability_onboarding%22'),sort:!(!('@timestamp',desc)))), but keep in mind that events delivered there with a delay of a couple of hours 😢 --------- Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
…222948) (#225454) # Backport This will backport the following commits from `main` to `9.0`: - [[Oblt Onboarding] Add more errors logging for Auto Detect flow (#222948)](#222948) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Mykola Harmash","email":"mykola.harmash@gmail.com"},"sourceCommit":{"committedDate":"2025-06-26T13:28:54Z","message":"[Oblt Onboarding] Add more errors logging for Auto Detect flow (#222948)\n\nCloses https://github.com/elastic/kibana/issues/218433\n\nThis change adds more descriptive error messages inside telemetry events\nin the auto detect onboarding flow. The extended error message be shown\nto the user as well.\n\n* New telemetry event for the case when user is not running the script\nas `root`\n* If Agent fails to download, bot the original error from `curl` and the\ndownload URL will be logged\n* If Agent fails to extract, error message from `tar` command will be\nlogged\n* If Agent fails to install, error message from `elastic-agent install`\ncommand will be logged\n* Error response from the integrations install endpoint will be logged\n\nExample telemetry event:\n\n\nExample terminal output:\n\n\n\n## How to test\n\nIn order to simulate errors for all scenarios, you going to need to\nmodify the `auto_detect.sh` script to make it intentionally fail, like\nadding extra character to the EA download URL. You can modify it\ndirectly in the source if you're running Kibana locally, or you can\nmodify it after it was downloaded and before running it.\n\nTo test just one use-case without the script manipulations, you can\nmodify the EA download URL inside the code snippet provided by Kibana.\n\n**Whatever way you choose, still go though the flow and make sure the\nsuccessful path works as expected.**\n\nYou can check the telemetry events emitted from the flow on [the staging\ntelemetry\ncluster](https://telemetry-v2-staging.elastic.dev/s/observability-ux/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),dataSource:(dataViewId:b4befdd3-9a15-40c2-be4d-3ac1084d6182,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'event_type%20:%20%22observability_onboarding%22'),sort:!(!('@timestamp',desc)))),\nbut keep in mind that events delivered there with a delay of a couple of\nhours 😢\n\n---------\n\nCo-authored-by: Joe Reuter <johannes.reuter@elastic.co>","sha":"6b452c79ae2947e91c613dbc1417cc60f1aba157","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","backport:version","v9.1.0","v8.19.0"],"title":"[Oblt Onboarding] Add more errors logging for Auto Detect flow","number":222948,"url":"https://github.com/elastic/kibana/pull/222948","mergeCommit":{"message":"[Oblt Onboarding] Add more errors logging for Auto Detect flow (#222948)\n\nCloses https://github.com/elastic/kibana/issues/218433\n\nThis change adds more descriptive error messages inside telemetry events\nin the auto detect onboarding flow. The extended error message be shown\nto the user as well.\n\n* New telemetry event for the case when user is not running the script\nas `root`\n* If Agent fails to download, bot the original error from `curl` and the\ndownload URL will be logged\n* If Agent fails to extract, error message from `tar` command will be\nlogged\n* If Agent fails to install, error message from `elastic-agent install`\ncommand will be logged\n* Error response from the integrations install endpoint will be logged\n\nExample telemetry event:\n\n\nExample terminal output:\n\n\n\n## How to test\n\nIn order to simulate errors for all scenarios, you going to need to\nmodify the `auto_detect.sh` script to make it intentionally fail, like\nadding extra character to the EA download URL. You can modify it\ndirectly in the source if you're running Kibana locally, or you can\nmodify it after it was downloaded and before running it.\n\nTo test just one use-case without the script manipulations, you can\nmodify the EA download URL inside the code snippet provided by Kibana.\n\n**Whatever way you choose, still go though the flow and make sure the\nsuccessful path works as expected.**\n\nYou can check the telemetry events emitted from the flow on [the staging\ntelemetry\ncluster](https://telemetry-v2-staging.elastic.dev/s/observability-ux/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),dataSource:(dataViewId:b4befdd3-9a15-40c2-be4d-3ac1084d6182,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'event_type%20:%20%22observability_onboarding%22'),sort:!(!('@timestamp',desc)))),\nbut keep in mind that events delivered there with a delay of a couple of\nhours 😢\n\n---------\n\nCo-authored-by: Joe Reuter <johannes.reuter@elastic.co>","sha":"6b452c79ae2947e91c613dbc1417cc60f1aba157"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/222948","number":222948,"mergeCommit":{"message":"[Oblt Onboarding] Add more errors logging for Auto Detect flow (#222948)\n\nCloses https://github.com/elastic/kibana/issues/218433\n\nThis change adds more descriptive error messages inside telemetry events\nin the auto detect onboarding flow. The extended error message be shown\nto the user as well.\n\n* New telemetry event for the case when user is not running the script\nas `root`\n* If Agent fails to download, bot the original error from `curl` and the\ndownload URL will be logged\n* If Agent fails to extract, error message from `tar` command will be\nlogged\n* If Agent fails to install, error message from `elastic-agent install`\ncommand will be logged\n* Error response from the integrations install endpoint will be logged\n\nExample telemetry event:\n\n\nExample terminal output:\n\n\n\n## How to test\n\nIn order to simulate errors for all scenarios, you going to need to\nmodify the `auto_detect.sh` script to make it intentionally fail, like\nadding extra character to the EA download URL. You can modify it\ndirectly in the source if you're running Kibana locally, or you can\nmodify it after it was downloaded and before running it.\n\nTo test just one use-case without the script manipulations, you can\nmodify the EA download URL inside the code snippet provided by Kibana.\n\n**Whatever way you choose, still go though the flow and make sure the\nsuccessful path works as expected.**\n\nYou can check the telemetry events emitted from the flow on [the staging\ntelemetry\ncluster](https://telemetry-v2-staging.elastic.dev/s/observability-ux/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),dataSource:(dataViewId:b4befdd3-9a15-40c2-be4d-3ac1084d6182,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'event_type%20:%20%22observability_onboarding%22'),sort:!(!('@timestamp',desc)))),\nbut keep in mind that events delivered there with a delay of a couple of\nhours 😢\n\n---------\n\nCo-authored-by: Joe Reuter <johannes.reuter@elastic.co>","sha":"6b452c79ae2947e91c613dbc1417cc60f1aba157"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Mykola Harmash <mykola.harmash@gmail.com> Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ic#222948) Closes elastic#218433 This change adds more descriptive error messages inside telemetry events in the auto detect onboarding flow. The extended error message be shown to the user as well. * New telemetry event for the case when user is not running the script as `root` * If Agent fails to download, bot the original error from `curl` and the download URL will be logged * If Agent fails to extract, error message from `tar` command will be logged * If Agent fails to install, error message from `elastic-agent install` command will be logged * Error response from the integrations install endpoint will be logged Example telemetry event:  Example terminal output:  ## How to test In order to simulate errors for all scenarios, you going to need to modify the `auto_detect.sh` script to make it intentionally fail, like adding extra character to the EA download URL. You can modify it directly in the source if you're running Kibana locally, or you can modify it after it was downloaded and before running it. To test just one use-case without the script manipulations, you can modify the EA download URL inside the code snippet provided by Kibana. **Whatever way you choose, still go though the flow and make sure the successful path works as expected.** You can check the telemetry events emitted from the flow on [the staging telemetry cluster](https://telemetry-v2-staging.elastic.dev/s/observability-ux/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),dataSource:(dataViewId:b4befdd3-9a15-40c2-be4d-3ac1084d6182,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'event_type%20:%20%22observability_onboarding%22'),sort:!(!('@timestamp',desc)))), but keep in mind that events delivered there with a delay of a couple of hours 😢 --------- Co-authored-by: Joe Reuter <johannes.reuter@elastic.co> (cherry picked from commit 6b452c7) # Conflicts: # x-pack/test/api_integration/deployment_agnostic/apis/observability/onboarding/update_progress.ts
|
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
…#222948) (#225596) # Backport This will backport the following commits from `main` to `8.19`: - [[Oblt Onboarding] Add more errors logging for Auto Detect flow (#222948)](#222948) <!--- Backport version: 10.0.1 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Mykola Harmash","email":"mykola.harmash@gmail.com"},"sourceCommit":{"committedDate":"2025-06-26T13:28:54Z","message":"[Oblt Onboarding] Add more errors logging for Auto Detect flow (#222948)\n\nCloses https://github.com/elastic/kibana/issues/218433\n\nThis change adds more descriptive error messages inside telemetry events\nin the auto detect onboarding flow. The extended error message be shown\nto the user as well.\n\n* New telemetry event for the case when user is not running the script\nas `root`\n* If Agent fails to download, bot the original error from `curl` and the\ndownload URL will be logged\n* If Agent fails to extract, error message from `tar` command will be\nlogged\n* If Agent fails to install, error message from `elastic-agent install`\ncommand will be logged\n* Error response from the integrations install endpoint will be logged\n\nExample telemetry event:\n\n\nExample terminal output:\n\n\n\n## How to test\n\nIn order to simulate errors for all scenarios, you going to need to\nmodify the `auto_detect.sh` script to make it intentionally fail, like\nadding extra character to the EA download URL. You can modify it\ndirectly in the source if you're running Kibana locally, or you can\nmodify it after it was downloaded and before running it.\n\nTo test just one use-case without the script manipulations, you can\nmodify the EA download URL inside the code snippet provided by Kibana.\n\n**Whatever way you choose, still go though the flow and make sure the\nsuccessful path works as expected.**\n\nYou can check the telemetry events emitted from the flow on [the staging\ntelemetry\ncluster](https://telemetry-v2-staging.elastic.dev/s/observability-ux/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),dataSource:(dataViewId:b4befdd3-9a15-40c2-be4d-3ac1084d6182,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'event_type%20:%20%22observability_onboarding%22'),sort:!(!('@timestamp',desc)))),\nbut keep in mind that events delivered there with a delay of a couple of\nhours 😢\n\n---------\n\nCo-authored-by: Joe Reuter <johannes.reuter@elastic.co>","sha":"6b452c79ae2947e91c613dbc1417cc60f1aba157","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","backport:version","v9.1.0","v8.19.0","v9.0.4"],"title":"[Oblt Onboarding] Add more errors logging for Auto Detect flow","number":222948,"url":"https://github.com/elastic/kibana/pull/222948","mergeCommit":{"message":"[Oblt Onboarding] Add more errors logging for Auto Detect flow (#222948)\n\nCloses https://github.com/elastic/kibana/issues/218433\n\nThis change adds more descriptive error messages inside telemetry events\nin the auto detect onboarding flow. The extended error message be shown\nto the user as well.\n\n* New telemetry event for the case when user is not running the script\nas `root`\n* If Agent fails to download, bot the original error from `curl` and the\ndownload URL will be logged\n* If Agent fails to extract, error message from `tar` command will be\nlogged\n* If Agent fails to install, error message from `elastic-agent install`\ncommand will be logged\n* Error response from the integrations install endpoint will be logged\n\nExample telemetry event:\n\n\nExample terminal output:\n\n\n\n## How to test\n\nIn order to simulate errors for all scenarios, you going to need to\nmodify the `auto_detect.sh` script to make it intentionally fail, like\nadding extra character to the EA download URL. You can modify it\ndirectly in the source if you're running Kibana locally, or you can\nmodify it after it was downloaded and before running it.\n\nTo test just one use-case without the script manipulations, you can\nmodify the EA download URL inside the code snippet provided by Kibana.\n\n**Whatever way you choose, still go though the flow and make sure the\nsuccessful path works as expected.**\n\nYou can check the telemetry events emitted from the flow on [the staging\ntelemetry\ncluster](https://telemetry-v2-staging.elastic.dev/s/observability-ux/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),dataSource:(dataViewId:b4befdd3-9a15-40c2-be4d-3ac1084d6182,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'event_type%20:%20%22observability_onboarding%22'),sort:!(!('@timestamp',desc)))),\nbut keep in mind that events delivered there with a delay of a couple of\nhours 😢\n\n---------\n\nCo-authored-by: Joe Reuter <johannes.reuter@elastic.co>","sha":"6b452c79ae2947e91c613dbc1417cc60f1aba157"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/222948","number":222948,"mergeCommit":{"message":"[Oblt Onboarding] Add more errors logging for Auto Detect flow (#222948)\n\nCloses https://github.com/elastic/kibana/issues/218433\n\nThis change adds more descriptive error messages inside telemetry events\nin the auto detect onboarding flow. The extended error message be shown\nto the user as well.\n\n* New telemetry event for the case when user is not running the script\nas `root`\n* If Agent fails to download, bot the original error from `curl` and the\ndownload URL will be logged\n* If Agent fails to extract, error message from `tar` command will be\nlogged\n* If Agent fails to install, error message from `elastic-agent install`\ncommand will be logged\n* Error response from the integrations install endpoint will be logged\n\nExample telemetry event:\n\n\nExample terminal output:\n\n\n\n## How to test\n\nIn order to simulate errors for all scenarios, you going to need to\nmodify the `auto_detect.sh` script to make it intentionally fail, like\nadding extra character to the EA download URL. You can modify it\ndirectly in the source if you're running Kibana locally, or you can\nmodify it after it was downloaded and before running it.\n\nTo test just one use-case without the script manipulations, you can\nmodify the EA download URL inside the code snippet provided by Kibana.\n\n**Whatever way you choose, still go though the flow and make sure the\nsuccessful path works as expected.**\n\nYou can check the telemetry events emitted from the flow on [the staging\ntelemetry\ncluster](https://telemetry-v2-staging.elastic.dev/s/observability-ux/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))&_a=(columns:!(),dataSource:(dataViewId:b4befdd3-9a15-40c2-be4d-3ac1084d6182,type:dataView),filters:!(),interval:auto,query:(language:kuery,query:'event_type%20:%20%22observability_onboarding%22'),sort:!(!('@timestamp',desc)))),\nbut keep in mind that events delivered there with a delay of a couple of\nhours 😢\n\n---------\n\nCo-authored-by: Joe Reuter <johannes.reuter@elastic.co>","sha":"6b452c79ae2947e91c613dbc1417cc60f1aba157"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/225454","number":225454,"state":"MERGED","mergeCommit":{"sha":"f8b8abee68cf1d30bc5e3210b3fe5047b614ebb2","message":"[9.0] [Oblt Onboarding] Add more errors logging for Auto Detect flow (#222948) (#225454)\n\n# Backport\n\nThis will backport the following commits from `main` to `9.0`:\n- [[Oblt Onboarding] Add more errors logging for Auto Detect flow\n(#222948)](https://github.com/elastic/kibana/pull/222948)\n\n\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by: Mykola Harmash <mykola.harmash@gmail.com>\nCo-authored-by: Joe Reuter <johannes.reuter@elastic.co>"}}]}] BACKPORT-->
Closes #218433
This change adds more descriptive error messages inside telemetry events in the auto detect onboarding flow. The extended error message be shown to the user as well.
rootcurland the download URL will be loggedtarcommand will be loggedelastic-agent installcommand will be loggedExample telemetry event:

Example terminal output:

How to test
In order to simulate errors for all scenarios, you going to need to modify the
auto_detect.shscript to make it intentionally fail, like adding extra character to the EA download URL. You can modify it directly in the source if you're running Kibana locally, or you can modify it after it was downloaded and before running it.To test just one use-case without the script manipulations, you can modify the EA download URL inside the code snippet provided by Kibana.
Whatever way you choose, still go though the flow and make sure the successful path works as expected.
You can check the telemetry events emitted from the flow on the staging telemetry cluster, but keep in mind that events delivered there with a delay of a couple of hours 😢