Skip to content

Remove queue time from spans duration on Jenkins traces#204

Merged
drodriguezhdez merged 5 commits into
masterfrom
drodriguezhdez/remove_queue_time_span_endtime
Apr 26, 2021
Merged

Remove queue time from spans duration on Jenkins traces#204
drodriguezhdez merged 5 commits into
masterfrom
drodriguezhdez/remove_queue_time_span_endtime

Conversation

@drodriguezhdez

@drodriguezhdez drodriguezhdez commented Apr 22, 2021

Copy link
Copy Markdown
Collaborator

Requirements for Contributing to this repository

  • Fill out the template below. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • The pull request must only fix one issue at the time.
  • The pull request must update the test suite to demonstrate the changed functionality.
  • After you create the pull request, all status checks must be pass before a maintainer reviews your contribution. For more details, please see CONTRIBUTING.

What does this PR do?

Currently, the queue time is included in the span duration for those cases where the queue time is reported in a Jenkins internal step (for Jenkins Pipelines).

This happens because the indexed spans don't know the queue time until its Allocate node : Body : Start node finishes; this kind of node is a child span from the indexed spans. In these cases, we need to subtract the queue time from the affected spans to obtain a correct span duration.

This PR removes the queue time from the duration of the affected spans.

Description of the Change

  • Subtract the queue time for the Pipeline root span (when necessary).
  • Adjust the child spans start/end time (if root span was affected).
  • Subtract the queue time for Stage spans (when necessary).

Alternate Designs

Possible Drawbacks

Verification Process

Additional Notes

Release Notes

Review checklist (to be filled by reviewers)

  • Feature or bug fix MUST have appropriate tests (unit, integration, etc...)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have one changelog/ label attached. If applicable it should have the backward-incompatible label attached.
  • PR should not have do-not-merge/ label attached.
  • If Applicable, issue must have kind/ and severity/ labels attached at least.

@drodriguezhdez
drodriguezhdez force-pushed the drodriguezhdez/remove_queue_time_span_endtime branch from a423d9b to ada8071 Compare April 22, 2021 07:59
Daniel Rodriguez Hernandez added 2 commits April 22, 2021 11:02
@drodriguezhdez drodriguezhdez added the changelog/Fixed Fixed features results into a bug fix version bump label Apr 22, 2021
@drodriguezhdez
drodriguezhdez marked this pull request as ready for review April 22, 2021 09:35
@drodriguezhdez
drodriguezhdez merged commit 05d544a into master Apr 26, 2021
@drodriguezhdez
drodriguezhdez deleted the drodriguezhdez/remove_queue_time_span_endtime branch April 26, 2021 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Fixed Fixed features results into a bug fix version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants