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: Shortcut evaluation of rules containing 'root.' #1018

Merged
merged 6 commits into from
Mar 7, 2024

Conversation

kentquirk
Copy link
Contributor

@kentquirk kentquirk commented Feb 29, 2024

Which problem is this PR solving?

The new root. rule can be shortcut in many cases -- if you only check the root span, then you don't have to check every span since it's going to have the same result.

This also uncovered a bug in the original logic -- in a situation where there were multiple entries in Fields with root. preceding an entry without it, we would have been testing the wrong span for the later entries.

Short description of the changes

  • Add optimization
  • Add a couple of new tests

@kentquirk kentquirk marked this pull request as ready for review February 29, 2024 14:59
@kentquirk kentquirk requested a review from a team as a code owner February 29, 2024 14:59
@kentquirk kentquirk changed the title feat: Attempt to shortcut root rules feat: Shortcut evaluation of rules containing 'root.' Feb 29, 2024
@robbkidd robbkidd self-assigned this Mar 1, 2024
@MikeGoldsmith MikeGoldsmith added the type: enhancement New feature or request label Mar 5, 2024
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith 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 👍🏻

@kentquirk kentquirk merged commit 7bd258f into main Mar 7, 2024
3 checks passed
@kentquirk kentquirk deleted the kent.root_optimization branch March 7, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants