-
Couldn't load subscription status.
- Fork 117
feat: add rich diff by default #346
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #346 +/- ##
============================================
+ Coverage 79.45% 81.88% +2.43%
- Complexity 1772 1806 +34
============================================
Files 137 137
Lines 7568 7640 +72
============================================
+ Hits 6013 6256 +243
+ Misses 1555 1384 -171 Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
@brettmc this one is ready as well. |
This PR improves the trace structure assertion mechanism by implementing a PHPUnit-style diff output for comparing expected and actual trace structures. This enhancement makes it significantly easier for developers to understand what went wrong when trace assertions fail.
Key Improvements
Added a unified diff format similar to PHPUnit's approach
Clear visual indicators for additions (+) and removals (-)
Proper indentation for nested structures
Consistent formatting for complex trace structures
Span kinds are displayed as readable constants (e.g., KIND_SERVER instead of 2)
Status codes are displayed as readable constants (e.g., STATUS_ERROR instead of 2)
Improved formatting for status descriptions and other trace attributes
Implemented a recursive diffing algorithm that handles nested structures
Detailed comparison of arrays, including both indexed and associative arrays
Special handling for trace-specific data structures
Before/After Example
Before:
After:
Example with multiple root spans