mirror of
https://github.com/beestat/app.git
synced 2025-07-09 03:04:07 -04:00
Moved user to it's own section of Sentry logging
This commit is contained in:
parent
c50d64b0d8
commit
c019fddce6
@ -705,6 +705,7 @@ final class cora {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send data to Sentry for error logging.
|
// Send data to Sentry for error logging.
|
||||||
|
// https://docs.sentry.io/development/sdk-dev/event-payloads/
|
||||||
$data = [
|
$data = [
|
||||||
'event_id' => str_replace('-', '', exec('uuidgen -r')),
|
'event_id' => str_replace('-', '', exec('uuidgen -r')),
|
||||||
'timestamp' => date('c'),
|
'timestamp' => date('c'),
|
||||||
@ -715,7 +716,6 @@ final class cora {
|
|||||||
'error_code' => $error_code
|
'error_code' => $error_code
|
||||||
],
|
],
|
||||||
'extra' => [
|
'extra' => [
|
||||||
'user_id' => $user_id,
|
|
||||||
'api_user_id' => $api_user_id,
|
'api_user_id' => $api_user_id,
|
||||||
'error_file' => $error_file,
|
'error_file' => $error_file,
|
||||||
'error_line' => $error_line,
|
'error_line' => $error_line,
|
||||||
@ -725,6 +725,10 @@ final class cora {
|
|||||||
'type' => 'Exception',
|
'type' => 'Exception',
|
||||||
'value' => $error_message,
|
'value' => $error_message,
|
||||||
'handled' => false
|
'handled' => false
|
||||||
|
],
|
||||||
|
'user' => [
|
||||||
|
'id' => $user_id,
|
||||||
|
'ip_address' => $_SERVER['REMOTE_ADDR']
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user