[TSVB] Fix shard failures are not reported#123474
Conversation
|
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
flash1293
left a comment
There was a problem hiding this comment.
Tested and works well. LGTM 👍
# Conflicts: # src/plugins/vis_types/timeseries/public/metrics_type.ts
💚 Build SucceededMetrics [docs]Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @alexwizp |
|
@elastic/infra-monitoring-ui @elastic/kibana-app-services please have a look |
Dosant
left a comment
There was a problem hiding this comment.
Nice improvement 👍 From my and app services code perspective lgtm
But have some questions/suggestions for TSVB code. Maybe some of the worth an issue:
- It seems like error path of TSVB is handled poorly and hides a lot of info
For example:
this is what I got:
All shards failed

And this is how much info inside the es response:
{"errBody":{"is_partial":true,"is_running":false,"start_time_in_millis":1643284656920,"expiration_time_in_millis":1643284716920,"response":{"took":3,"timed_out":false,"terminated_early":false,"num_reduce_phases":0,"_shards":{"total":1,"successful":0,"skipped":0,"failed":1,"failures":[{"shard":0,"index":"kibana_sample_data_ecommerce","node":"aTguCaz_QamVRWwzvm0LGA","reason":{"type":"query_shard_exception","reason":"failed to create query: [kibana_sample_data_ecommerce][0] Watch out!","index_uuid":"kq37gPxmRBSoaQs0xhbGnA","index":"kibana_sample_data_ecommerce","caused_by":{"type":"runtime_exception","reason":"[kibana_sample_data_ecommerce][0] Watch out!"}}}]},"hits":{"total":{"value":0,"relation":"gte"},"max_score":null,"hits":[]}},"error":{"type":"status_exception","reason":"error while executing search","caused_by":{"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"kibana_sample_data_ecommerce","node":"aTguCaz_QamVRWwzvm0LGA","reason":{"type":"query_shard_exception","reason":"failed to create query: [kibana_sample_data_ecommerce][0] Watch out!","index_uuid":"kq37gPxmRBSoaQs0xhbGnA","index":"kibana_sample_data_ecommerce","caused_by":{"type":"runtime_exception","reason":"[kibana_sample_data_ecommerce][0] Watch out!"}}}]}}},"statusCode":400}
-
Currently errored es responses aren't propagated through
trackedEsSearches. I think this would be very useful to add. -
FYI, there is a testing module in es that could help with testing errors: elastic/elasticsearch#71674
| ) | ||
| .pipe( | ||
| tap((data) => { | ||
| if (trackingEsSearchMeta?.requestId && trackedEsSearches) { |
There was a problem hiding this comment.
I think that would be nice if this code also executed when searching request errors out completely.
| }), | ||
| schema: schema.boolean(), | ||
| }, | ||
| [UI_SETTINGS.ALLOW_CHECKING_FOR_FAILED_SHARDS]: { |
There was a problem hiding this comment.
Not sure I understand the reason for adding the uiSetting
|
Agreed, reporting errors in the same way would be a nice addition. However I think it's fine to split that out into a separate PR as the issue is about shard warnings which were hidden completely from the users point of view previously (in case all shards fail it's very obvious from the state of the chart). |
* [TSVB] Fix shard failures are not reported elastic#122944 Closes: elastic#122944 * fix PR comments * Update ui_settings.ts Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [TSVB] Fix shard failures are not reported elastic#122944 Closes: elastic#122944 * fix PR comments * Update ui_settings.ts Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 7e1b780) # Conflicts: # src/plugins/vis_types/timeseries/common/constants.ts # src/plugins/vis_types/timeseries/kibana.json # src/plugins/vis_types/timeseries/public/metrics_type.ts # src/plugins/vis_types/timeseries/server/ui_settings.ts # x-pack/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts
* [TSVB] Fix shard failures are not reported (#123474) * [TSVB] Fix shard failures are not reported #122944 Closes: #122944 * fix PR comments * Update ui_settings.ts Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 7e1b780) # Conflicts: # src/plugins/vis_types/timeseries/common/constants.ts # src/plugins/vis_types/timeseries/kibana.json # src/plugins/vis_types/timeseries/public/metrics_type.ts # src/plugins/vis_types/timeseries/server/ui_settings.ts # x-pack/plugins/infra/server/lib/adapters/metrics/kibana_metrics_adapter.ts * fix CI Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [TSVB] Fix shard failures are not reported elastic#122944 Closes: elastic#122944 * fix PR comments * Update ui_settings.ts Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 7e1b780) # Conflicts: # src/plugins/vis_types/timeseries/kibana.json # src/plugins/vis_types/timeseries/public/metrics_type.ts
* [TSVB] Fix shard failures are not reported (#123474) * [TSVB] Fix shard failures are not reported #122944 Closes: #122944 * fix PR comments * Update ui_settings.ts Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 7e1b780) # Conflicts: # src/plugins/vis_types/timeseries/kibana.json # src/plugins/vis_types/timeseries/public/metrics_type.ts * fix * fix telemetry Co-authored-by: Alexey Antonov <alexwizp@gmail.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Closes: #122944, Closes: #15424
🏁 Shard failures are not reported #122944
Describe the feature:
Screens:
Screen.Recording.2022-01-21.at.6.45.33.PM.mov
🏁 Allow Elasticsearch request bodies to be displayed #15424
Describe the feature:
Screens:
Screen.Recording.2022-01-21.at.6.46.14.PM.mov