Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55842

Exceptions should be sent to Sentry as messages

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Blocker
    • Resolution: Fixed
    • evergreen
    • None
    • Evergreen - Milestone 2

    Description

      We are currently sending Java exceptions to the Sentry backend by using raven.captureException instead of raven.captureMessage:
       

      if (data.log.exception) {
        this.raven.captureException(new Error(data.log.message), errorData);
      } else {
        this.raven.captureMessage(data.log.message, errorData);
      }
      

      This makes Sentry aggregate litterally all logs that have an exceptions associated into a single event. This is because doing the new Error(... we create an exception from the place it is, and it's always the same. So Sentry somewhat rightly sees those as the same.

      And unfortunately, given we had marked as ignored the "SmokeTestException" one, everything got ignored the same way until recently as I was looking for that specific SmokeTestException ignored on purpose. And only by chance I finally saw in the Events tab that many unrelated events were merged there... :facepalm:

      Example:
      The title of the Sentry issue:


      and the Events tab:

      Expected behavior

      Exceptions should be sent like the rest. Using the message as the title, and the exception can stay as is currently.

      Attachments

        1. issue-title.png
          issue-title.png
          18 kB
        2. last events.png
          last events.png
          116 kB
        3. screenshot-1.png
          screenshot-1.png
          166 kB

        Issue Links

          Activity

            batmat Baptiste Mathus created issue -
            batmat Baptiste Mathus made changes -
            Field Original Value New Value
            Attachment screenshot-1.png [ 45828 ]
            batmat Baptiste Mathus made changes -
            Attachment issue-title.png [ 45829 ]
            batmat Baptiste Mathus made changes -
            Attachment last events.png [ 45830 ]
            batmat Baptiste Mathus made changes -
            Description We are currently sending Java exceptions to the Sentry backend by using {{raven.captureException}} instead of {{raven.captureMessage}}:
             
            {code:java}
            if (data.log.exception) {
              this.raven.captureException(new Error(data.log.message), errorData);
            } else {
              this.raven.captureMessage(data.log.message, errorData);
            }
            {code}

            This makes Sentry aggregate litterally all logs that have an exceptions associated into a single event.
            And unfortunately, given we had marked as ignored the "SmokeTestException" one, everything got ignored the same way until recently as I



             
            We are currently sending Java exceptions to the Sentry backend by using {{raven.captureException}} instead of {{raven.captureMessage}}:
             
            {code:java}
            if (data.log.exception) {
              this.raven.captureException(new Error(data.log.message), errorData);
            } else {
              this.raven.captureMessage(data.log.message, errorData);
            }
            {code}

            This makes Sentry aggregate litterally all logs that have an exceptions associated into a single event. This is because doing the {{new Error(...}} we create an exception from the place it is, and it's always the same. So Sentry somewhat rightly sees those as the same.

            And unfortunately, given we had marked as ignored the "SmokeTestException" one, everything got ignored the same way until recently as I was looking for that specific SmokeTestException ignored on purpose. And only by chance I finally saw in the Events tab that many unrelated events were merged there... :facepalm:

            Example:
            The title of the Sentry issue:

             !issue-title.png|thumbnail!
             !screenshot-1.png|thumbnail!

            and the Events tab:

             !last events.png|thumbnail!

            h3. Expected behavior

            Exceptions should be sent like the rest. Using the message as the title, and the exception can stay as is currently.
            batmat Baptiste Mathus made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            batmat Baptiste Mathus made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            batmat Baptiste Mathus made changes -
            Remote Link This issue links to "PR (Web Link)" [ 22326 ]
            batmat Baptiste Mathus made changes -
            Sprint Evergreen - Milestone 2 [ 516 ]
            batmat Baptiste Mathus made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]

            People

              batmat Baptiste Mathus
              batmat Baptiste Mathus
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: