Skip to content

fix: fix identify root spans with child_of links - #5557

Merged
ie-pham merged 7 commits into
grafana:mainfrom
mexirica:fix/trace-root-span-incorrectly-identified-due-to-instrumentations
Sep 18, 2025
Merged

fix: fix identify root spans with child_of links#5557
ie-pham merged 7 commits into
grafana:mainfrom
mexirica:fix/trace-root-span-incorrectly-identified-due-to-instrumentations

Conversation

@mexirica

@mexirica mexirica commented Aug 20, 2025

Copy link
Copy Markdown
Contributor

What this PR does:
Fixes incorrect root span detection in Parquet trace conversion (v2, v3, v4, v5). Now, a span is only considered root if it has no parent and no child_of link

Which issue(s) this PR fixes:
Fixes #3634

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
@knylander-grafana

Copy link
Copy Markdown
Contributor

Greetings. Do you have any doc that you need reviewed for this PR? The Documentation box is checked but I didn't see any doc files in the PR.

BTW, nice changelog entry. It's very clear and concise.

@mexirica

mexirica commented Aug 23, 2025

Copy link
Copy Markdown
Contributor Author

Sorry, checked by mistaken, no docs added.

Already changed the field @knylander-grafana

Thanks for the changelog!

@joe-elliott

Copy link
Copy Markdown
Collaborator

Nice! Thank you for taking this on.

The example in the original issue had child of links that linked to the same trace. I'm wondering if we want to check for both child of links and if they are internal to the trace. @ie-pham do you have input on this?

Comment thread tempodb/encoding/vparquet3/schema.go Outdated

@joe-elliott joe-elliott left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Apologies for taking so long to get to this. Thank you for this contribution 🙏

@mexirica

This comment has been minimized.

@ie-pham ie-pham 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.

LGTM! Amazing job. Thank you for contributing

@ie-pham
ie-pham merged commit 5578bec into grafana:main Sep 18, 2025
22 checks passed
mattdurham pushed a commit to mattdurham/tempo that referenced this pull request Jun 18, 2026
* feat: add support for identifying root spans with child_of links in traceToParquet

* feat: add pr in changelog

* Verify if link childs are internal to the trace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants