Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tracing): set parent span correctly #11786

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

samugi
Copy link
Member

@samugi samugi commented Oct 18, 2023

Note: the bug was introduced by #11468 where the parent_id was incorrectly updated on the balancer span instead of the root span. This PR reverts that part.

Summary

When the balancer instrumentation was enabled, the parent span was set incorrectly on traces, this fix addresses the problem by setting the parent span correctly on the root (kong) span when there is an incoming tracing header.

Checklist

Full changelog

  • [Implement ...]

Issue reference

KAG-2811
FTI-5485

* when the `balancer` instrumentation was enabled, the parent span
  was set incorrectly on traces, this fix addresses the problem by
  setting the parent span correctly on the root (`kong`) span when
  there is an incoming tracing header.
Copy link
Contributor

@nowNick nowNick left a comment

Choose a reason for hiding this comment

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

Looks good to me!
🚀

@samugi samugi merged commit 72580d5 into master Oct 24, 2023
47 checks passed
@samugi samugi deleted the fix/tracing-set-parent-span-correctly branch October 24, 2023 14:54
@team-gateway-bot
Copy link
Collaborator

The backport to release/3.4.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.4.x release/3.4.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.4.x
# Create a new branch
git switch --create backport-11786-to-release/3.4.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 72580d5ff18fcc5cdf994a097dae8eb16215ff92
# Push it to GitHub
git push --set-upstream origin backport-11786-to-release/3.4.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.4.x

Then, create a pull request where the base branch is release/3.4.x and the compare/head branch is backport-11786-to-release/3.4.x.

team-gateway-bot pushed a commit that referenced this pull request Oct 24, 2023
when the `balancer` instrumentation was enabled, the parent span
was set incorrectly on traces, this fix addresses the problem by
setting the parent span correctly on the root (`kong`) span when
there is an incoming tracing header.

(cherry picked from commit 72580d5)
team-gateway-bot pushed a commit that referenced this pull request Oct 24, 2023
when the `balancer` instrumentation was enabled, the parent span
was set incorrectly on traces, this fix addresses the problem by
setting the parent span correctly on the root (`kong`) span when
there is an incoming tracing header.

(cherry picked from commit 72580d5)
@team-gateway-bot
Copy link
Collaborator

The backport to release/3.5.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.5.x release/3.5.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.5.x
# Create a new branch
git switch --create backport-11786-to-release/3.5.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 72580d5ff18fcc5cdf994a097dae8eb16215ff92
# Push it to GitHub
git push --set-upstream origin backport-11786-to-release/3.5.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.5.x

Then, create a pull request where the base branch is release/3.5.x and the compare/head branch is backport-11786-to-release/3.5.x.

samugi added a commit that referenced this pull request Oct 24, 2023
when the `balancer` instrumentation was enabled, the parent span
was set incorrectly on traces, this fix addresses the problem by
setting the parent span correctly on the root (`kong`) span when
there is an incoming tracing header.
samugi added a commit that referenced this pull request Oct 25, 2023
when the `balancer` instrumentation was enabled, the parent span
was set incorrectly on traces, this fix addresses the problem by
setting the parent span correctly on the root (`kong`) span when
there is an incoming tracing header.

(cherry picked from commit 72580d5)
samugi added a commit that referenced this pull request Oct 25, 2023
when the `balancer` instrumentation was enabled, the parent span
was set incorrectly on traces, this fix addresses the problem by
setting the parent span correctly on the root (`kong`) span when
there is an incoming tracing header.
samugi added a commit that referenced this pull request Oct 25, 2023
when the `balancer` instrumentation was enabled, the parent span
was set incorrectly on traces, this fix addresses the problem by
setting the parent span correctly on the root (`kong`) span when
there is an incoming tracing header.

(cherry picked from commit 72580d5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants