Skip to content
This repository was archived by the owner on May 29, 2024. It is now read-only.

Commit 840073f

Browse files
author
Ethen Pociask
authored
Lagniappe Cleanups (#155)
1 parent 63104d3 commit 840073f

File tree

11 files changed

+16
-72
lines changed

11 files changed

+16
-72
lines changed

docs/architecture/alerting.markdown

+15-6
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,17 @@ end
2424
subgraph AM["Alerting Manager"]
2525
alertingRelay --> |Alert|EL
2626
EL[eventLoop] --> |Alert SUUID|AS["AlertStore"]
27-
AS --> |Alert Destination|EL
28-
EL --> |Submit alert|AD[Destination]
29-
AD --> |Slack|SH["Slack Handler"]
30-
AD --> |counterParty|CPH["Counterparty Handler"]
27+
AS --> |Alert Policy|EL
28+
EL --> |Submit alert|SR["SeverityRouter"]
29+
SR --> SH["Slack"]
30+
SR --> PH["PagerDuty"]
31+
SR --> CPH["CounterParty Handler"]
3132

3233
end
3334
CPH --> |"HTTP POST"|TPH["Third Party API"]
3435
SH --> |"HTTP POST"|SlackAPI("Slack Webhook API")
36+
PH --> |"HTTP POST"|PagerDutyAPI("PagerDuty API")
37+
3538
</div>
3639
{% endraw %}
3740

@@ -49,9 +52,12 @@ An alert destination is a configurable destination that an alert can be sent to.
4952
#### Slack
5053
The Slack alert destination is a configurable destination that allows alerts to be sent to a specific Slack channel. The Slack alert destination will be configured with a Slack webhook URL. The Slack alert destination will then use this URL to send alerts to the specified Slack channel.
5154

52-
**NOTE: As of now Pessimism can only post alerts to a single slack channel**
5355

54-
### Cooldown
56+
#### PagerDuty
57+
The PagerDuty alert destination is a configurable destination that allows alerts to be sent to a specific PagerDuty services via the use of integration keys. Pessimism also uses the SUUID associated with an alert as a deduplication key for PagerDuty. This is done to ensure that PagerDuty will not be spammed with duplicate or incidents.
58+
59+
60+
### Alert CoolDowns
5561
To ensure that alerts aren't spammed to destinations once invoked, a time based cooldown value (`cooldown_time`) can be defined within the `alert_params` of a heuristic session config. This time value determines how long a heuristic session must wait before being allowed to alert again.
5662

5763
An example of this is shown below:
@@ -73,3 +79,6 @@ An example of this is shown below:
7379
}
7480
}
7581
```
82+
83+
### Alert Messages
84+
Pessimism allows for the arbitrary customization of alert messages. This is done by defining an `message` value string within the `alerting_params` of a heuristic session bootstrap config or session creation request. This is critical for providing additional context on alerts that allow for easier ingestion by downstream consumers (i.e, alert responders).

genesis.example.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"heuristic_params": {
1212
"address": "0xfC0157aA4F5DB7177830ACddB3D5a9BB5BE9cc5e",
13-
"args": ["Transfer(address, address, uint256)"]
13+
"args": ["Transfer(address,address,uint256)"]
1414
}
1515
},
1616
{
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

mocks/alert_client.go

-65
This file was deleted.

0 commit comments

Comments
 (0)