Skip to content

Commit

Permalink
log response from event ingestion endpoint (#39)
Browse files Browse the repository at this point in the history
* log response from event ingestion endpoint

* Remove condition

* use info

* fix, ffs
  • Loading branch information
datashaman authored Oct 24, 2023
1 parent a11cad6 commit 72d2e86
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/ServiceBusChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,29 @@ public function send($notifiable, Notification $notification)
];

try {
$this->client->request(
$response = $this->client->request(
'POST',
$this->getUrl('events'),
[
'headers' => $headers,
'json' => [$params],
]
);
if (!in_array($eventType, $dontReport)) {
Log::debug(
"$eventType service bus notification",
[
'event' => $eventType,
'params' => $params,
'tags' => [
'service-bus',
],
]
);
}

Log::info(
"$eventType service bus notification",
[
'event' => $eventType,
'params' => $params,
'tags' => [
'service-bus',
],
'response' => [
'status' => $response->getStatusCode(),
'body' => (string) $response->getBody(),
],
]
);
} catch (RequestException $exception) {
$code = $exception->getCode();

Expand Down

0 comments on commit 72d2e86

Please sign in to comment.