Skip to content

Commit 3864b25

Browse files
committed
use context instead of now-defunct extras
1 parent 0f7e384 commit 3864b25

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/SentryTarget.php

+5-4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public function export()
9898
$data = [
9999
'message' => '',
100100
'tags' => ['category' => $category],
101+
'context' => [],
101102
'extra' => [],
102103
'userData' => [],
103104
];
@@ -128,7 +129,7 @@ public function export()
128129
}
129130
if (isset($text['error'])) {
130131
$data['message'] = (string)$text['error'];
131-
unset($text['message']);
132+
unset($text['error']);
132133
}
133134
// if none of the above have text, stringify the object
134135
if (!isset($data['message'])) {
@@ -145,7 +146,7 @@ public function export()
145146
unset($text['exception']);
146147
}
147148

148-
$data['extra'] = $text;
149+
$data['context'] = $text;
149150
} else {
150151
$data['message'] = (string)$text;
151152
}
@@ -157,8 +158,8 @@ public function export()
157158
$data = $this->runExtraCallback($text, $data);
158159

159160
$scope->setUser($data['userData']);
160-
foreach ($data['extra'] as $key => $value) {
161-
$scope->setExtra((string)$key, $value);
161+
foreach ($data['context'] as $key => $value) {
162+
$scope->setContext((string)$key, $value);
162163
}
163164
foreach ($data['tags'] as $key => $value) {
164165
if ($value) {

0 commit comments

Comments
 (0)