Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-10401

End of task log should always be INFO and include the task's status

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.1
    • Component/s: Compute Engine
    • Labels:

      Description

      For each executed task in the Compute Engine, logs such as the following are generated in ce.log:

      2018.01.31 08:34:44 INFO  ce[AWFLI6ihg2wape3yPFMb][o.s.c.t.CeWorkerImpl] Execute task | project=foo:bar | type=REPORT | id=AWFLI6ihg2wape3yPFMb | submitter=foo@bitbucket
      2018.01.31 08:34:44 ERROR ce[AWFLI6ihg2wape3yPFMb][o.s.c.t.CeWorkerImpl] Executed task | project=foo:bar | type=REPORT | id=AWFLI6ihg2wape3yPFMb | submitter=foo@bitbucket | time=303ms
      
      • In case of a functional error, only those two logs are generated.
      • In case of non-functional error, the stacktrace of the error, at ERROR level, will be included between those two lines.
      • If the task is successful, the same (and only) two lines are generated, but the second one's level is INFO.

      Having the end of task log at ERROR level is creating noise in monitoring tools:

      1. in case of functional error, there is no information on the cause => the error is not actionnable => noise
      2. in case of another error, there is two lines at ERROR level => noise

      Therefor, the 2nd log line should always be a INFO level and the status of the task should be included in the log's payload:

      2018.01.31 08:34:44 INFO ce[AWFLI6ihg2wape3yPFMb][o.s.c.t.CeWorkerImpl] Executed task | project=foo:bar | type=REPORT | id=AWFLI6ihg2wape3yPFMb | submitter=foo@bitbucket | status=FAILED | time=303ms
      

        Attachments

          Activity

            People

            Assignee:
            sebastien.lesaint Sebastien Lesaint
            Reporter:
            sebastien.lesaint Sebastien Lesaint
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: