File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,6 +84,25 @@ dependencies {
8484
8585## 🎛️ Advanced Configuration
8686
87+ ### Context Display with beforeContextSize
88+
89+ Show preceding method calls even when they don't match your filter:
90+
91+ ``` kotlin
92+ .filter { event -> event.methodName == " inner" }
93+ .beforeContextSize(1 ) // Show 1 preceding event for context
94+ ```
95+
96+ ** Output:**
97+ ```
98+ → SimpleNestedHierarchy.middle() // Context (doesn't match filter)
99+ → SimpleNestedHierarchy.inner() // Matches filter
100+ ← SimpleNestedHierarchy.inner
101+ ← SimpleNestedHierarchy.middle
102+ ```
103+
104+ Useful for debugging: See what led to specific method calls, track where null values originated, or understand deep call chains.
105+
87106### Custom Formatting
88107
89108Want custom formatting? Configure it easily:
@@ -136,21 +155,6 @@ codePathTrace(customTracer) {
136155}
137156```
138157
139- ### Filtering Examples
140-
141- ``` kotlin
142- // Trace only your app code
143- .filter { event -> event.className.startsWith(" com.mycompany" ) }
144-
145- // Skip common methods
146- .filter { event ->
147- ! listOf (" toString" , " hashCode" , " equals" ).contains(event.methodName)
148- }
149-
150- // Focus on specific depth levels
151- .filter { event -> event.depth < 3 }
152- ```
153-
154158
155159## 🏃♂️ Quick Verification
156160
You can’t perform that action at this time.
0 commit comments