Enable timestamp in stage execution logs.
Problem to solve
One of the most valuable plugins available to Jenkins is the (Timestamper)[https://plugins.jenkins.io/timestamper/], which prepends the timestamp to every line, much like looking at Linux system logs.
This functionality is mission critical to anyone attempting to do performance analysis, debugging, or improvements on a job.
Intended users
Anyone who may be looking into the execution logs to debug or analyze.
- Sasha (Software Developer)
- Devon (DevOps Engineer)
- Sidney (Systems Administrator)
- Simone (Software Engineer in Test)
- Allison (Application Ops)
- Priyanka (Platform Engineer)
- Dana (Data Analyst)
User experience goal
The user should be able to look at a job's execution logs in and determine which subsection of this job is the largest bottleneck.
Real world examples:
- When someone complains that a particular stage in Jenkins (job in GitLab) takes too long, how do we debug that? How do I analyze how much of the execution was spent downloading dependencies, vs how much time was spent compiling the code? If the lines had timestamps, I could determine exactly where the bottleneck lies.
- When running tests, sometimes there is a single test which takes far longer than others. Users complain about testing taking too long and now we need to debug this. In order to determine which test is hanging or taking the largest amount of time, if I could go through the execution logs and see timestamps, I could find the test cmd where things take longer than expected and then debug that.
- This is a small scale example, but real world: In my (terratest:eks)[https://gitlab.com/sandlin/aws/terraform_eks/-/jobs/563074542] stage, I can see
go test ...
takes6:13
, but what part is taking so long? Is it the tests? Is it the dependency download? etc.
Proposal
In theory, I can enable / disable this via the project's config.
Further details
Jenkins plugin: (Timestamper)[https://plugins.jenkins.io/timestamper/]
Permissions and Security
Documentation
Availability & Testing
What does success look like, and how can we measure that?
What is the type of buyer?
Any user who has reached the point in job size or test quantity where they need to debug bottlenecks.