RP-15: Implement trace-aware event grouping#12
Merged
Conversation
- Add span_id and parent_span_id fields to TimelineEvent model - Create TraceGroupingService with SpanNode/TraceTree/TraceGroup models for reconstructing span hierarchies from event telemetry - Implement SpanRelationStrategy with hierarchical scoring: parent-child (1.0) > sibling (0.8) > same trace (0.5) - Wire SpanRelationStrategy into CorrelationEngine default pipeline - Fix edge cases: orphan spans with unknown parents treated as roots, events without span_ids fall back to same-trace scoring RP-15
- Configure ruff (py313, 120 line-length, common rule sets) - Configure mypy (strict optional, check untyped defs) - Add .pre-commit-config.yaml with ruff --fix, ruff-format, mypy - Fix 106+ pre-existing lint issues (unused imports, datetime.UTC, import sorting, unsorted __all__, assert False, etc.) - Fix mypy issues: mock constructor kwargs, type narrowing, None guards - Add ruff/mypy/pre-commit to [dev] optional dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: implement trace-aware event grouping with span relation scoring
import sorting, unsorted all, assert False, etc.)