Collect and submit jenkins.job.stage_duration#76
Merged
Conversation
FlorianVeaux
force-pushed
the
florian/new_stage_metrics
branch
from
June 18, 2020 12:30
452924e to
43740a8
Compare
This comment has been minimized.
This comment has been minimized.
FlorianVeaux
commented
Jun 18, 2020
sarah-witt
reviewed
Jun 18, 2020
sarah-witt
left a comment
Collaborator
There was a problem hiding this comment.
I did a quick pass and it looks good so far. I'm going to try it out later!
FlorianVeaux
force-pushed
the
florian/new_stage_metrics
branch
from
June 19, 2020 10:40
103fb7e to
6462a85
Compare
sarah-witt
reviewed
Jun 19, 2020
Co-authored-by: Sarah Witt <[email protected]>
sarah-witt
reviewed
Jun 22, 2020
Co-authored-by: Sarah Witt <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new listener "DatadogGraphListener" that is called on every start of a 'node' in a pipeline.
When the hook is called with a StepEndNode, we now that a "part" of the pipeline has completed. The listener then fetches the corresponding StartEndNode, verifies that this node is indeed a "stage", and if so submit a "jenkins.job.duration" metric with the timing difference between the start node and the end node.
How does the lister handles stages within stages ?
For each stage (no matter its depth) a metric will be submitted with the corresponding
stage_nametag. Additionally, a stage_depth tag is added to those metrics that represent how deep the stage is in the pipeline.It can be useful when querying those metrics if for example one want to see the duration of all top level stages of a pipeline.