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

Enable Sentry user capturing

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: evergreen
    • Labels:
      None
    • Similar Issues:
    • Sprint:
      Evergreen - Milestone 1

      Description

      User capturing is not enabled, hence makes it harder to automatically correlate messages from the same user in Sentry UI

      When working on JENKINS-53251, I see the "User" field on the top right always at 0:

      Expected behavior

      Reading https://docs.sentry.io/learn/context/#capturing-the-user, I think that we only have to change our code in two places in sentry.js.

      Instead of

      Raven.captureMessage(data.log.message, {
        level: data.log.level.toLowerCase(),
        logger: data.log.name,
        extra: {
          uuid: data.uuid,
          source: data.log
        }
      });
      

      We should use `id` field instead of `uuid`, i.e.:

      Raven.captureMessage(data.log.message, {
        level: data.log.level.toLowerCase(),
        logger: data.log.name,
        extra: {
          id: data.uuid,
          source: data.log
        }
      });
      

        Attachments

          Issue Links

            Activity

            batmat Baptiste Mathus created issue -
            batmat Baptiste Mathus made changes -
            Field Original Value New Value
            Epic Link JENKINS-51299 [ 190634 ]
            batmat Baptiste Mathus made changes -
            Attachment user count always 0.png [ 43923 ]
            batmat Baptiste Mathus made changes -
            Description h3. User capturing is not enabled, hence makes it harder to automatically correlate messages from the same user in Sentry UI

            When working on JENKINS-53251, I see the "User" field on the top right always at 0.

            My understanding is that we should send https://docs.sentry.io/learn/context/#capturing-the-user
            h3. User capturing is not enabled, hence makes it harder to automatically correlate messages from the same user in Sentry UI

            When working on JENKINS-53251, I see the "User" field on the top right always at 0:
             !user count always 0.png!

            h3. Expected behavior

            Reading https://docs.sentry.io/learn/context/#capturing-the-user, I _think_ that we only have to change our code in two places in [sentry.js|https://github.com/jenkins-infra/evergreen/blob/fc4875a6d112f7bca2d1080e301125703de63285/services/src/libs/sentry.js#L47].

            Instead of

            {code:js}
            Raven.captureMessage(data.log.message, {
              level: data.log.level.toLowerCase(),
              logger: data.log.name,
              extra: {
                uuid: data.uuid,
                source: data.log
              }
            });
            {code}

            We should use `id` field instead of `uuid`, i.e.:
            {code:js}
            Raven.captureMessage(data.log.message, {
              level: data.log.level.toLowerCase(),
              logger: data.log.name,
              extra: {
                id: data.uuid,
                source: data.log
              }
            });
            {code}
            batmat Baptiste Mathus made changes -
            Assignee R. Tyler Croy [ rtyler ] Baptiste Mathus [ batmat ]
            batmat Baptiste Mathus made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            batmat Baptiste Mathus made changes -
            Remote Link This issue links to "evergreen PR (Web Link)" [ 21405 ]
            batmat Baptiste Mathus made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            batmat Baptiste Mathus made changes -
            Link This issue relates to JENKINS-53251 [ JENKINS-53251 ]
            batmat Baptiste Mathus made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]
            batmat Baptiste Mathus made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            rtyler R. Tyler Croy made changes -
            Assignee Baptiste Mathus [ batmat ] R. Tyler Croy [ rtyler ]
            rtyler R. Tyler Croy made changes -
            Resolution Fixed [ 1 ]
            Status Reopened [ 4 ] Fixed but Unreleased [ 10203 ]
            rtyler R. Tyler Croy made changes -
            Sprint Evergreen - Milestone 1 [ 511 ] Evergreen - Milestone 1, Evergreen - Milestone 2 [ 511, 516 ]
            batmat Baptiste Mathus made changes -
            Sprint Evergreen - Milestone 1, Evergreen - Milestone 2 [ 511, 516 ] Evergreen - Milestone 1 [ 511 ]
            batmat Baptiste Mathus made changes -
            Status Fixed but Unreleased [ 10203 ] Closed [ 6 ]

              People

              Assignee:
              rtyler R. Tyler Croy
              Reporter:
              batmat Baptiste Mathus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: