Webhook

Send notifications to an external endpoint via an http POST request.

Configuration

In Inspector, navigate to the project you want to activate email notifications.

  • Click Settings → Notifications Channels

  • Click Configure in the Webhook channel to open the configuration screen

  • Paste the url you want to send the http POST requests with notifications content as body

Remember to click "Save" after any change in the channel settings.

If you want to disable the channel click "Disconnect" and confirm your choise.

HTTP POST request format

When a request is fired against your endpoint it will contain specific information in its body and headers. Below you can understand the content delivered for each event.

Error Occurrence

Headers:

User-Agent: "Inspector-Notification-Channel"
X-Inspector-Key: "your-application-api-key"

Body:

{
event: "error_occurrence_detected_notification",
application: {
id: 12345,
name: "Your App",
last_seen_at: "2020-06-26 09:03:54",
is_active: true,
client_version: "4.4.12"
},
payload: {
timestamp: "2020-06-26 09:03:54",
message: "Missing required parameters for [Route: home] [URI: /]",
class: "ErrorException",
file: "app/Http/Controllers/YourController.php",
line: "17"
}
}

Error Group

Headers:

User-Agent: "Inspector-Notification-Channel"
X-Inspector-Key: "your-application-api-key"

Body:

{
event: "error_group_detected_notification",
application: {
id: 12345,
name: "Your App",
last_seen_at: "2020-06-26 09:03:54",
is_active: true,
client_version: "4.4.12"
},
payload: {
last_seen_at: "2020-06-26 09:03:54",
created_at: "2020-06-26 09:03:54",
handled: false,
message: "Missing required parameters for [Route: home] [URI: /]",
class: "ErrorException",
file: "app/Http/Controllers/YourController.php",
line: "17"
}
}

Error Frequency Increasing

Headers:

User-Agent: "Inspector-Notification-Channel"
X-Inspector-Key: "your-application-api-key"

Body:

{
event: "error_frequency_increasing_notification",
application: {
id: 12345,
name: "Your App",
last_seen_at: "2020-06-26 09:03:54",
is_active: true,
client_version: "4.4.12"
},
payload: {
last_seen_at: "2020-06-26 09:03:54",
created_at: "2020-06-26 09:03:54",
handled: false,
message: "Missing required parameters for [Route: home] [URI: /]",
class: "ErrorException",
file: "app/Http/Controllers/YourController.php",
line: "17"
}
}

10^nth Error Occurrence

Headers:

User-Agent: "Inspector-Notification-Channel"
X-Inspector-Key: "your-application-api-key"

Body:

{
event: "nth_error_notification",
application: {
id: 12345,
name: "Your App",
last_seen_at: "2020-06-26 09:03:54",
is_active: true,
client_version: "4.4.12"
},
payload: {
last_seen_at: "2020-06-26 09:03:54",
created_at: "2020-06-26 09:03:54",
handled: false,
message: "Missing required parameters for [Route: home] [URI: /]",
class: "ErrorException",
file: "app/Http/Controllers/YourController.php",
line: "17"
}
}

New Transaction

Headers:

User-Agent: "Inspector-Notification-Channel"
X-Inspector-Key: "your-application-api-key"

Body:

{
event: "transaction_group_notification",
application: {
id: 12345,
name: "Your App",
last_seen_at: "2020-06-26 09:03:54",
is_active: true,
client_version: "4.4.12"
},
payload: {
created_at: "2020-06-26 09:03:54",
name: "GET /bookings",
type: "request",
hostname: "server-name",
highlighted: false
}
}