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: Root spans must have a non-empty parent ID field #1236

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

MikeGoldsmith
Copy link
Contributor

Which problem is this PR solving?

Span's with a parentID field with an empty value "" are considered root spans. This PR updates the logic to determine root spans to check that both the parentID field exists and is not empty for it to be considered a root span.

Short description of the changes

  • Check the parentID field is both present and has a value when checking if the span is a root span
  • Update tests to verify updated behaviour

@MikeGoldsmith MikeGoldsmith added the type: bug Something isn't working label Jul 18, 2024
@MikeGoldsmith MikeGoldsmith self-assigned this Jul 18, 2024
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner July 18, 2024 19:37
@kentquirk kentquirk changed the title fix: Root span's must have a non-empty parent ID field fix: Root spans must have a non-empty parent ID field Jul 18, 2024
Copy link
Contributor

@kentquirk kentquirk left a comment

Choose a reason for hiding this comment

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

This is counter to spec for some reason, but I don't see any reason we shouldn't do this. Thanks.

@MikeGoldsmith MikeGoldsmith merged commit 923c010 into main Jul 18, 2024
5 checks passed
@MikeGoldsmith MikeGoldsmith deleted the mike/root-spans-empty-id branch July 18, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refinery does not properly handle empty parentId strings when determining root spans
2 participants