Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] Failed jobs should log when job status is synced in ES #44847

Closed
tsullivan opened this issue Sep 5, 2019 · 2 comments · Fixed by #45077
Closed

[Reporting] Failed jobs should log when job status is synced in ES #44847

tsullivan opened this issue Sep 5, 2019 · 2 comments · Fixed by #45077
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead enhancement New value added to drive a business result

Comments

@tsullivan
Copy link
Member

tsullivan commented Sep 5, 2019

Successful reporting jobs log when their output was successfully saved in Elasticsearch:

server    log   [22:10:48.501] [info][queue-job][reporting] Successfully queued job: k068fp8q21uzcbae0ceokj3j
server    log   [22:10:49.639] [info][esqueue][queue-worker][reporting] k067sy5n21uzcbae0c5s88ga - Claimed job k068fp8q21uzcbae0ceokj3j
server    log   [22:10:49.639] [info][esqueue][queue-worker][reporting] k067sy5n21uzcbae0c5s88ga - Starting job
server    log   [22:10:50.232] [info][PNG][execute][k068fp8q21uzcbae0ceokj3j][reporting] opening url ### Big URL
server    log   [22:10:58.073] [info][PNG][execute][k068fp8q21uzcbae0ceokj3j][reporting] handled 72 page requests
server    log   [22:10:58.914] [info][PNG][execute][k068fp8q21uzcbae0ceokj3j][reporting] found 2 rendered elements in the DOM
server    log   [22:10:59.922] [info][PNG][execute][k068fp8q21uzcbae0ceokj3j][reporting] taking screenshots
server    log   [22:11:00.735] [info][PNG][execute][k068fp8q21uzcbae0ceokj3j][reporting] screenshots taken: 1
server    log   [22:11:00.737] [info][esqueue][queue-worker][reporting] k067sy5n21uzcbae0c5s88ga - Job execution completed successfully
server    log   [22:11:00.842] [info][esqueue][queue-worker][reporting] k067sy5n21uzcbae0c5s88ga - Job data saved successfully: /.reporting-2019.09.01/_doc/k068fp8q21uzcbae0ceokj3j

Unsuccessful jobs are logging the error message encountered, but behind the scenes, Reporting also has to update the job document in Elasticsearch with the failed status and failure reason. Given that failures mean that things are flaky to begin with, we really want to take that event out of behind-the-scenes.

server    log   [22:09:34.099] [info][queue-job][reporting] Successfully queued job: k068e3tq21uzcbae0c7vi213
server    log   [22:09:34.346] [info][esqueue][queue-worker][reporting] k067sy5n21uzcbae0c5s88ga - Claimed job k068e3tq21uzcbae0c7vi213
server    log   [22:09:34.347] [info][esqueue][queue-worker][reporting] k067sy5n21uzcbae0c5s88ga - Starting job
server   error  [22:09:34.370] [error][execute][k068e3tq21uzcbae0c7vi213][printable_pdf][reporting] Error: Unable to generate report. Blah blah blah.
    #### Stack trace

Example screenshot showing existing logs for bad job and good job:
image

@tsullivan tsullivan added enhancement New value added to drive a business result (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead Team:Stack Services labels Sep 5, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services

@tsullivan
Copy link
Member Author

Should look like this when there's a failure:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead enhancement New value added to drive a business result
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants