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

Prototype error telemetry logging with a Java Util Logger configuration

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • evergreen
    • None
    • Evergreen - Milestone 1

      Per this discussion on jenkinsci-dev, we should prototype whether we can inject custom logger simply through the java.util.logging support already present in the JVM.

      The original thread I posted contains some requirements.

      I currently define "error telemetry" to include:

      • Uncaught exceptions which cause the Evil Jenkins 500 page
      • Logged ERROR messages, with or without exceptions
      • Logged WARN messages, with or without exceptions

      The big question I have in my mind is: can we inject some custom Java code (perhaps this has to be delivered via a plugin?) for reporting exceptions to the Evergreen services layer.

          [JENKINS-49805] Prototype error telemetry logging with a Java Util Logger configuration

          Status update: after some experimentation, I submitted a JEP for review on the dev ML https://groups.google.com/forum/#!msg/jenkinsci-dev/IrNOfrlgEEw/MiR5wDiXAQAJ

          The implementation for demonstration of feasibility is filed at https://github.com/jenkins-infra/evergreen/pull/43 on evergreen, using https://github.com/batmat/essentials-plugin on my GH account for now before I have the community agreement it's the right path, and I move it to the jenkinsci org.

          Baptiste Mathus added a comment - Status update: after some experimentation, I submitted a JEP for review on the dev ML https://groups.google.com/forum/#!msg/jenkinsci-dev/IrNOfrlgEEw/MiR5wDiXAQAJ The implementation for demonstration of feasibility is filed at https://github.com/jenkins-infra/evergreen/pull/43 on evergreen, using https://github.com/batmat/essentials-plugin on my GH account for now before I have the community agreement it's the right path, and I move it to the jenkinsci org.

          JEP draft merged.
          Will make an adjustment pass tomorrow to make sure the evergreen implementation is aligned with the JEP.

          Baptiste Mathus added a comment - JEP draft merged. Will make an adjustment pass tomorrow to make sure the evergreen implementation is aligned with the JEP.

          rtyler processory question: do you prefer we create smaller tasks for downstream things and so on, or keeping the central one is enough (OK, I see the answer coming: it depends ).

          Here my example is: I'm going to start the hosting process of the Jenkins Essentials Plugin to move forward with my previous comment. For this example, would you create some specific task on "our" side like "Host the Essentials plugin", or you wouldn't bother, or you don't care at all? Thanks

          Baptiste Mathus added a comment - rtyler processory question: do you prefer we create smaller tasks for downstream things and so on, or keeping the central one is enough (OK, I see the answer coming: it depends ). Here my example is: I'm going to start the hosting process of the Jenkins Essentials Plugin to move forward with my previous comment. For this example, would you create some specific task on "our" side like "Host the Essentials plugin", or you wouldn't bother, or you don't care at all? Thanks

          HOSTING-541 created.

          Baptiste Mathus added a comment - HOSTING-541 created.

          R. Tyler Croy added a comment -

          Creating smaller task which we can keep in this board is reasonable to me, anything with the label "essentials" should show up. (outside of HOSTING request).

          Just don't make a Jira sub-task, those things are terrible

          R. Tyler Croy added a comment - Creating smaller task which we can keep in this board is reasonable to me, anything with the label "essentials" should show up. (outside of HOSTING request). Just don't make a Jira sub-task, those things are terrible

          Baptiste Mathus added a comment - HOSTING-541 processed. Permission PR filed at https://github.com/jenkins-infra/repository-permissions-updater/pull/662

          As discussed on the chat Friday with rtyler, we need to enrich the JEP and prototype to see if/how to have a rotating log file implem to be closer to Apache logrotate for instance. Meaning: the file to read would always be, say, file.log, and the rotated ones would be file.log.1, file.log.2, and so on.

          Baptiste Mathus added a comment - As discussed on the chat Friday with rtyler , we need to enrich the JEP and prototype to see if/how to have a rotating log file implem to be closer to Apache logrotate for instance. Meaning: the file to read would always be, say, file.log , and the rotated ones would be file.log.1 , file.log.2 , and so on.

          Some small adjustments to the now hosted plugin https://github.com/jenkinsci/essentials-plugin/pull/1

          Baptiste Mathus added a comment - Some small adjustments to the now hosted plugin https://github.com/jenkinsci/essentials-plugin/pull/1

          So I'm going to close this, as I just checked we do implement the JEP.

          • JENKINS-50164 still blocks the implementation of some part of the "data segregation" part of the JEP, but will be enough already to track it. I'll adjust the image once it's approved & merged.
          • I also filed https://github.com/jenkinsci/jep/pull/80 to add some clarifications about log rotation expectations after a discussion with rtyler, and an overlook for the name field I had forgotten to put in the JSON logs

          Baptiste Mathus added a comment - So I'm going to close this, as I just checked we do implement the JEP. JENKINS-50164 still blocks the implementation of some part of the "data segregation" part of the JEP, but will be enough already to track it. I'll adjust the image once it's approved & merged. I also filed https://github.com/jenkinsci/jep/pull/80  to add some clarifications about log rotation expectations after a discussion with rtyler , and an overlook for the name field I had forgotten to put in the JSON logs

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

              Created:
              Updated:
              Resolved: