Skip to content

Commit b465ab9

Browse files
committed
refactor(collector): Improve exception trace collection
- Remove vendor traces from the collected exception trace - Replace base path with an empty string in the collected trace
1 parent 0efd0e0 commit b465ab9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Collectors/ExceptionTraceCollector.php

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public function collect(): array
2121
{
2222
return collect(explode(\PHP_EOL, $this->exception->getTraceAsString()))
2323
->filter(static fn ($trace): bool => !Str::contains($trace, 'vendor'))
24+
->map(static fn ($trace): string => (string) str($trace)->replaceFirst(base_path(), ''))
2425
->all();
2526
}
2627
}

0 commit comments

Comments
 (0)