fix(ingest): non-empty stack_trace for hub occurrences (BIT-796)

Accept stack_trace as an alias for stacktrace. When both are absent, store a
synthesized stack line derived from context so recent-errors always exposes
dedupe-friendly text. Fingerprints still ignore synthesized stacks so grouping
matches legacy omit-stack payloads.

PHP ingest client: fatal shutdown handler now sends a minimal stack line.

Paperclip-Agent: David Santos (id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-796
Paperclip-Run: 7f4a8c69-7b5b-47f2-9fc9-c99e6d57f2d2
Made-with: Cursor
This commit is contained in:
David Santos committed 2026-04-04 18:26:15 +00:00
1 parent b41f17886a
commit bd6e3805ec
5 files changed
+105 -5

No files matched your search

+8 -3
View File
@@ -69,12 +69,17 @@ final class ErrorReporter
if (!in_array($err['type'], $fatal, true)) {
return;
}
$file = (string) ($err['file'] ?? '');
$line = (int) ($err['line'] ?? 0);
$syn = $file !== '' && $line > 0
? "[fatal shutdown] {$file}:{$line}"
: '[fatal shutdown] (location unknown)';
self::reportMessage(
(string) $err['message'],
'critical',
(string) ($err['file'] ?? ''),
(int) ($err['line'] ?? 0),
'',
$file,
$line,
$syn,
['shutdown' => true, 'errno' => $err['type']]
);
});