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

feat: bug fix for segregating entrypoint spans and root spans in span filtering #7046

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

eKuG
Copy link
Contributor

@eKuG eKuG commented Feb 6, 2025

Summary

bug fix for segregating entrypoint spans and root spans in span filtering

Related Issues / PR's

Screenshots

NA

Affected Areas and Manually Tested Areas


Important

Fixes span filtering in buildSpanScopeQuery to correctly segregate entrypoint spans by ensuring parent_span_id is not empty.

  • Behavior:
    • Fixes span filtering in buildSpanScopeQuery in query_builder.go to correctly segregate entrypoint spans by adding parent_span_id != '' condition.
  • Tests:
    • Updates Test_buildTracesQuery in query_builder_test.go to reflect the new condition for entrypoint spans, ensuring parent_span_id != '' is included in the expected query.

This description was created by Ellipsis for 2416617. It will automatically update as commits are pushed.

@eKuG eKuG added bug Something isn't working docs shipped labels Feb 6, 2025
@eKuG eKuG enabled auto-merge (squash) February 6, 2025 07:45
@github-actions github-actions bot added the enhancement New feature or request label Feb 6, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot 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! Reviewed everything up to 2416617 in 1 minute and 5 seconds

More details
  • Looked at 26 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. pkg/query-service/app/traces/v4/query_builder.go:232
  • Draft comment:
    Added 'AND parent_span_id != '' condition to segregate entrypoint spans from root spans. Confirm that this extra filter covers all edge cases for entrypoint spans.
  • Reason this comment was not posted:
    Marked as duplicate.
2. pkg/query-service/app/traces/v4/query_builder_test.go:562
  • Draft comment:
    Updated expected query for entrypoint spans to include 'AND parent_span_id != '''. Verify that this aligns with the intended bug fix.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. pkg/query-service/app/traces/v4/query_builder.go:232
  • Draft comment:
    The query for entrypoint spans now correctly filters out root spans by adding AND parent_span_id != ''. Confirm that using an empty string is the intended check (vs. handling possible NULLs).
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50%
    This comment asks the author to verify their implementation choice, which violates the rule "Do NOT ask the PR author to confirm their intention or double-check things". The code shows consistent use of empty string for parent_span_id checks. The comment is speculative about potential NULL values without evidence that this is actually an issue.
    Maybe there's a real issue with NULL values that could cause bugs? Maybe this is a critical validation that needs to happen?
    The code shows consistent use of empty string checks for parent_span_id throughout, including for root spans. Without evidence that NULL values are possible or problematic, this is just speculation.
    Delete this comment. It asks for verification without strong evidence of an issue, and the code shows consistent use of empty string checks.
4. pkg/query-service/app/traces/v4/query_builder_test.go:569
  • Draft comment:
    Updated expected output in test 'test noop list view with entry_point_spans' to include the new condition. Verify this aligns with the intended behavior.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is asking the PR author to verify if the updated expected output aligns with the intended behavior. This violates the rule against asking the author to confirm their intention or ensure behavior is intended.

Workflow ID: wflow_6NYTr1q9CpMUkp12


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@eKuG eKuG merged commit 94c2398 into main Feb 6, 2025
22 of 23 checks passed
@eKuG eKuG deleted the spanfilteringBugFix2 branch February 6, 2025 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docs shipped enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants