[8.6] Report: various improvements for troubleshooting (#149431) (#149650)

# Backport

This will backport the following commits from `main` to `8.6`:
- [Report: various improvements for troubleshooting
(#149431)](https://github.com/elastic/kibana/pull/149431)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tim
Sullivan","email":"tsullivan@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-01-26T23:51:10Z","message":"Report:
various improvements for troubleshooting (#149431)\n\n##
Summary\r\n\r\nWhen reports are slow to execute or wait in the queue for
a long time, a\r\ncouple of things have added to the difficulty of
troubleshooting based\r\non the logs:\r\n* there is no default-level log
message stating when a job has been\r\nclaimed and is beginning to
execute.\r\n* the report job ID is not shown anywhere in the UI, making
it hard to\r\ncorrelate log messages with the job listing\r\n\r\nThis PR
addresses those both of those things with minor changes.\r\n\r\n**New
log message:**\r\n<img width=\"2022\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/908371/214357980-bfcf7dc5-3bd4-40dd-9065-0ca520a5f859.png\">\r\n\r\n**New
field in the report job info panel:**\r\n<img width=\"1758\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/908371/214356657-344a116e-7d17-4683-b6da-0b868a4dc3ba.png\">","sha":"a791e4c5be447a44cf03566f03366f3e0b7a71a1","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.7.0","v8.6.2"],"number":149431,"url":"https://github.com/elastic/kibana/pull/149431","mergeCommit":{"message":"Report:
various improvements for troubleshooting (#149431)\n\n##
Summary\r\n\r\nWhen reports are slow to execute or wait in the queue for
a long time, a\r\ncouple of things have added to the difficulty of
troubleshooting based\r\non the logs:\r\n* there is no default-level log
message stating when a job has been\r\nclaimed and is beginning to
execute.\r\n* the report job ID is not shown anywhere in the UI, making
it hard to\r\ncorrelate log messages with the job listing\r\n\r\nThis PR
addresses those both of those things with minor changes.\r\n\r\n**New
log message:**\r\n<img width=\"2022\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/908371/214357980-bfcf7dc5-3bd4-40dd-9065-0ca520a5f859.png\">\r\n\r\n**New
field in the report job info panel:**\r\n<img width=\"1758\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/908371/214356657-344a116e-7d17-4683-b6da-0b868a4dc3ba.png\">","sha":"a791e4c5be447a44cf03566f03366f3e0b7a71a1"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/149431","number":149431,"mergeCommit":{"message":"Report:
various improvements for troubleshooting (#149431)\n\n##
Summary\r\n\r\nWhen reports are slow to execute or wait in the queue for
a long time, a\r\ncouple of things have added to the difficulty of
troubleshooting based\r\non the logs:\r\n* there is no default-level log
message stating when a job has been\r\nclaimed and is beginning to
execute.\r\n* the report job ID is not shown anywhere in the UI, making
it hard to\r\ncorrelate log messages with the job listing\r\n\r\nThis PR
addresses those both of those things with minor changes.\r\n\r\n**New
log message:**\r\n<img width=\"2022\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/908371/214357980-bfcf7dc5-3bd4-40dd-9065-0ca520a5f859.png\">\r\n\r\n**New
field in the report job info panel:**\r\n<img width=\"1758\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/908371/214356657-344a116e-7d17-4683-b6da-0b868a4dc3ba.png\">","sha":"a791e4c5be447a44cf03566f03366f3e0b7a71a1"}},{"branch":"8.6","label":"v8.6.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-01-26 19:57:49 -05:00 committed by GitHub
parent 343b95e8c3
commit a617e32c5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View file

@ -140,6 +140,12 @@ export const ReportInfoFlyoutContent: FunctionComponent<Props> = ({ info }) => {
description: info.metrics?.pdf?.pages,
},
{
title: i18n.translate('xpack.reporting.listing.infoPanel.jobId', {
defaultMessage: 'Report job ID',
}),
description: info.id,
},
{
title: i18n.translate('xpack.reporting.listing.infoPanel.processedByInfo', {
defaultMessage: 'Processed by',

View file

@ -177,12 +177,12 @@ export class ExecuteReportTask implements ReportingTask {
...doc,
});
this.logger.debug(
this.logger.info(
`Claiming ${claimedReport.jobtype} ${report._id} ` +
`[_index: ${report._index}] ` +
`[_seq_no: ${report._seq_no}] ` +
`[_primary_term: ${report._primary_term}] ` +
`[attempts: ${report.attempts}] ` +
`[_index: ${report._index}] ` +
`[_seq_no: ${report._seq_no}] ` +
`[_primary_term: ${report._primary_term}] ` +
`[attempts: ${report.attempts}] ` +
`[process_expiration: ${expirationTime}]`
);