You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Convert mermaid code blocks to SVGs client side (#11690)
* feat: convert mermaid code blocks to svgs client side
* use client component
* escape text content before interpreting as HTML
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* [getsentry/action-github-commit] Auto commit
* port the rest of mermaid diagrams to docs
* fix type
---------
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
How an event gets saved. Edges represent data flow through system.
@@ -25,8 +47,29 @@ This graph is extremely simplified mostly due to layout constraints. Missing fro
25
47
26
48
For more information read [Path of an event through Relay](https://getsentry.github.io/relay/relay_server/index.html#path-of-an-event-through-relay) and [Event Ingestion Pipeline](https://getsentry.github.io/event-ingestion-graph/).
Each region silo can be scaled independently, and is isolated from other regions. Within each region exists separate, dedicated infrastructure and applications as outlined in the [application overview](/architecture/#high-level-overview).
Copy file name to clipboardExpand all lines: develop-docs/application/control-silo.mdx
+48-7
Original file line number
Diff line number
Diff line change
@@ -42,8 +42,26 @@ When a request is handled by the API Gateway, the response delivered to the clie
42
42
43
43
Integrations can be shared by multiple organizations. For example, a single MS teams workspace can be connected to multiple organizations, and those organizations can live in multiple regions. A few of our integrations leverage refresh tokens and use short lived access tokens. To avoid racy updates when tokens become invalidated and need to be refreshed, we send outbound requests to control silo, which acts as a proxy for the integration service. By funnelling all outbound traffic for integrations that require refresh tokens through control silo we can more easily co-ordinate token replacements.
ControlSilo ->> ControlSilo : add integration credentials to request
56
+
ControlSilo ->> MsTeams : send notification request with credentials
57
+
MsTeams -->> ControlSilo : token expired!
58
+
ControlSilo ->> MsTeams : refresh token
59
+
MsTeams -->> ControlSilo : response
60
+
ControlSilo ->> ControlSilo : update stored token
61
+
ControlSilo ->> MsTeams : send notification with new token
62
+
MsTeams -->> ControlSilo : response
63
+
ControlSilo -->> RegionSilo : response
64
+
```
47
65
48
66
The integration proxy is implemented as a class that integrations requiring refresh tokens can sub-class. Currently the following integrations use the integration credential proxy:
49
67
@@ -121,17 +139,40 @@ where id in (...) and schedule_for < current_timestamp
121
139
122
140
For each mailbox with undelivered messages, we select a block of messages, and update their next schedule time to be a few minutes in the future. Doing this helps reduce the next scheduling task from attempting to deliver the same messages again.
Control Silo ->> Control Silo : find mailboxes with messages
148
+
Control Silo ->> Control Silo : filter out mailboxes with future delivery
149
+
Control Silo ->> Control Silo : update next delivery time for the next block
150
+
Control Silo ->> Control Silo : Spawn task to drain a mailbox
151
+
```
126
152
127
153
### Webhook Delivery
128
154
129
155
Scheduled webhooks are delivered by celery tasks. Delivery tasks attempt to forward requests to the relevant region silo. If delivery succeeds, the payload record is deleted from postgres. If the request fails and `attempts` is lower than the max attempts (10) the message is left alone, if the `attempts` is equal or higher than the max attempts, an log message is emitted and the webhook is discarded.
130
156
131
157
Draining a mailbox involves sending as many messages from a given mailbox as we can. Should we hit a networking error, the current head of line will be rescheduled and have its attempt number increased.
Control Silo ->> Control Silo : Fetch head block of mailbox
165
+
loop foreach message
166
+
Control Silo ->> Control Silo : if hook is above max attempts delete.
167
+
Control Silo ->> Region Silo : Deliver hook
168
+
alt success
169
+
Region Silo -->> Control Silo : 200-40x
170
+
Control Silo ->> Control Silo : delete hook
171
+
else error
172
+
Region Silo -->> Control Silo : 50x
173
+
Control Silo ->> Control Silo : increment attempt and reschedule
174
+
end
175
+
end
176
+
```
136
177
137
178
Notably, most 40x errors are considered 'successful' deliveries. The reason for this is that re-attempting a delivery of a webhook that initially had a 40x response will generally not result in a 200.
0 commit comments