Skip to content

Avoid sending jenkins.step.internal spans#202

Merged
drodriguezhdez merged 2 commits into
masterfrom
drodriguezhdez/remove_jenkins_internal
Apr 20, 2021
Merged

Avoid sending jenkins.step.internal spans#202
drodriguezhdez merged 2 commits into
masterfrom
drodriguezhdez/remove_jenkins_internal

Conversation

@drodriguezhdez

@drodriguezhdez drodriguezhdez commented Apr 19, 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?

We've received feedback from alpha customers saying jenkins.step.internal spans are not so much useful.
Additionally, we want to reduce the complexity of recalculating the trace tree when we tackle the issue of removing the queue time from the relevant span duration.

This PR modifies the algorithm that sends the spans of the Jenkins pipelines to avoid sending the jenkins.step.internal spans.

Description of the Change

Added an additional condition in the isTraceable method checking if the node is internal or not. If it's internal, the span is not sent and the algorithm continues with its children.

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 changed the title Avoid sending jenkins.internal spans Avoid sending jenkins.step.internal spans Apr 19, 2021
@drodriguezhdez drodriguezhdez added the changelog/Changed Changed features results into a major version bump label Apr 19, 2021
FlorianVeaux
FlorianVeaux previously approved these changes Apr 19, 2021

@FlorianVeaux FlorianVeaux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Added a small nit but feel free to disagree and ignore it

for(final BuildPipelineNode child : current.getChildren()) {
sendTrace(tracer, buildData, child, parentSpanContext);
}
} else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you could you return after the for loop instead of this big else block?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed! 👌🏼

@FlorianVeaux FlorianVeaux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect ✅

@drodriguezhdez
drodriguezhdez merged commit e88604c into master Apr 20, 2021
@drodriguezhdez
drodriguezhdez deleted the drodriguezhdez/remove_jenkins_internal branch April 20, 2021 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Changed Changed features results into a major version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants