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

logs for individual workflow steps do not contain timestamps

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Consider the workflow that is stored in an SCM

          node('master') {
              wrap([$class: 'TimestamperBuildWrapper']) {
                  sh 'echo I woz here'
              }
          }
      

      if you view ${JOB_URL}/${BUILD_ID}/console

      then you will see timestamps for the echo step but not the SCM checkout.

      However if you view the logs for the individual step ${JOB_URL}/${BUILD_ID}/execution/node/3/log/ then the output is shown without any timestamps. This means that to check performance of an individual step you need to look at all of the logs which is a performance issue - and not user friendly.

        Attachments

          Activity

          Hide
          stevengbrown Steven G Brown added a comment -

          On second thought, the Timestamper plugin could record the elapsed time in each TimestampNote. It doesn't seem to increase the size of the log files very much.

          Show
          stevengbrown Steven G Brown added a comment - On second thought, the Timestamper plugin could record the elapsed time in each TimestampNote . It doesn't seem to increase the size of the log files very much.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Steven Brown
          Path:
          src/main/java/hudson/plugins/timestamper/Timestamp.java
          src/main/java/hudson/plugins/timestamper/TimestampNote.java
          src/main/java/hudson/plugins/timestamper/TimestampNotesOutputStream.java
          src/main/java/hudson/plugins/timestamper/TimestamperBuildWrapper.java
          src/main/java/hudson/plugins/timestamper/format/TimestampFormatter.java
          src/test/java/hudson/plugins/timestamper/TimestampNoteTest.java
          src/test/java/hudson/plugins/timestamper/TimestampNotesOutputStreamTest.java
          src/test/java/hudson/plugins/timestamper/TimestampTest.java
          src/test/java/hudson/plugins/timestamper/action/TimestampsActionTest.java
          http://jenkins-ci.org/commit/timestamper-plugin/a7748486421c450d05288acde444c08ebe0c77d2
          Log:
          [FIXED JENKINS-30143] Store elapsed time in timestamp console notes

          The timestamp console notes previously relied on the context being a Run, so
          that they can get the build start time and use it to calculate the elapsed time.
          The elapsed time is now stored within the console notes during the build.

          This allows timestamps to be displayed when a different context type is
          provided, e.g. the workflow plugin provides a StepAtomNode.

          Builds that ran with an earlier version of Timestamper and an unrecognised
          context type will now display the system clock timestamps but not the elapsed
          timestamps, because that information was not recorded.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Steven Brown Path: src/main/java/hudson/plugins/timestamper/Timestamp.java src/main/java/hudson/plugins/timestamper/TimestampNote.java src/main/java/hudson/plugins/timestamper/TimestampNotesOutputStream.java src/main/java/hudson/plugins/timestamper/TimestamperBuildWrapper.java src/main/java/hudson/plugins/timestamper/format/TimestampFormatter.java src/test/java/hudson/plugins/timestamper/TimestampNoteTest.java src/test/java/hudson/plugins/timestamper/TimestampNotesOutputStreamTest.java src/test/java/hudson/plugins/timestamper/TimestampTest.java src/test/java/hudson/plugins/timestamper/action/TimestampsActionTest.java http://jenkins-ci.org/commit/timestamper-plugin/a7748486421c450d05288acde444c08ebe0c77d2 Log: [FIXED JENKINS-30143] Store elapsed time in timestamp console notes The timestamp console notes previously relied on the context being a Run, so that they can get the build start time and use it to calculate the elapsed time. The elapsed time is now stored within the console notes during the build. This allows timestamps to be displayed when a different context type is provided, e.g. the workflow plugin provides a StepAtomNode. Builds that ran with an earlier version of Timestamper and an unrecognised context type will now display the system clock timestamps but not the elapsed timestamps, because that information was not recorded.
          Hide
          stevengbrown Steven G Brown added a comment -

          Released with Timestamper 1.7.4.

          Show
          stevengbrown Steven G Brown added a comment - Released with Timestamper 1.7.4.
          Hide
          ssbarnea Sorin Sbarnea added a comment -

          Sorry for reopening this but it seem that the pipeline usage is not documented on the project homepage. Having is documented in side a bug it a fit away from ideal.

          Show
          ssbarnea Sorin Sbarnea added a comment - Sorry for reopening this but it seem that the pipeline usage is not documented on the project homepage. Having is documented in side a bug it a fit away from ideal.
          Hide
          stevengbrown Steven G Brown added a comment -

          Sorin Sbarnea, please feel welcome to add anything that is missing to the wiki.

          Show
          stevengbrown Steven G Brown added a comment - Sorin Sbarnea , please feel welcome to add anything that is missing to the wiki.

            People

            • Assignee:
              stevengbrown Steven G Brown
              Reporter:
              teilo James Nord
            • Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: