Skip to content

Commit 947a467

Browse files
a-haritigithub-advanced-security[bot]getsantry[bot]
authored
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>
1 parent 16145f4 commit 947a467

File tree

8 files changed

+1121
-25
lines changed

8 files changed

+1121
-25
lines changed

develop-docs/application/architecture.mdx

+68-7
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,31 @@ sidebar_order: 1
77

88
Edges represent service dependencies.
99

10-
![](https://mermaid.ink/svg/pako:eNqFU01PwzAM_StRTiDGeu8BCbQbcKFc0DwhN_XWqs2H0kQwtv13smSj1SrgFj8_v9gvzo4LXRHP-caiqdnrAhQas3zT3rJ7Y7pGoGu0WrHb2zu2LxaPe9aVu92Txoo9YIdKkD0cQHVlYgDvSTm7ndMnStPRXGiZoWkygOom6522lAHfM0sdbv8uO9IS-v5B5RJ4EQN2FaJr4CtQ_VaWOraobdQZ6KDiDRFtcd3iGLBUNX0o_2GnYuVLnKCSpEBRUzXJGN27jaWp0Fn-qDduYAAmDBGmaGvtewIV2RH90rolMmSnvZ5CbVuyY2sicHJnzPltliF5YcqQmM455MYvAApUnCM5yYDXzpk-z7JN42pfxlXYkEsqWbKbB1oR6QstvAypuG_Az1rp1f7RStt01HqJ9AstPuOSrMSmCou-A8UC0dUkCXgejhWt0XfueOchUNE7XWyV4LmznmbcmwodLRoMX0TyfI1dH9DgVpj5OX2e-IcO3z0YL2M)
11-
[diagram source](https://mermaid.live/edit#pako:eNqFU01PwzAM_StRTiDGeu8BCbQbcKFc0DwhN_XWqs2H0kQwtv13smSj1SrgFj8_v9gvzo4LXRHP-caiqdnrAhQas3zT3rJ7Y7pGoGu0WrHb2zu2LxaPe9aVu92Txoo9YIdKkD0cQHVlYgDvSTm7ndMnStPRXGiZoWkygOom6522lAHfM0sdbv8uO9IS-v5B5RJ4EQN2FaJr4CtQ_VaWOraobdQZ6KDiDRFtcd3iGLBUNX0o_2GnYuVLnKCSpEBRUzXJGN27jaWp0Fn-qDduYAAmDBGmaGvtewIV2RH90rolMmSnvZ5CbVuyY2sicHJnzPltliF5YcqQmM455MYvAApUnCM5yYDXzpk-z7JN42pfxlXYkEsqWbKbB1oR6QstvAypuG_Az1rp1f7RStt01HqJ9AstPuOSrMSmCou-A8UC0dUkCXgejhWt0XfueOchUNE7XWyV4LmznmbcmwodLRoMX0TyfI1dH9DgVpj5OX2e-IcO3z0YL2M)
12-
10+
```mermaid
11+
graph TD
12+
app[Your Application] --> |SDK| lb{{Load Balancer}}
13+
lb --> |"sentry.example.com/api/\d+/store/"| relay
14+
lb --> |"sentry.example.com"| sentry_web["Sentry (web)"]
15+
symbolicator --> sentry_web
16+
relay --> kafka
17+
relay --> redis
18+
sentry_web --> snuba
19+
sentry_web --> memcached
20+
sentry_web --> postgres
21+
sentry_web --> redis
22+
snuba --> kafka
23+
snuba --> redis
24+
snuba --> clickhouse
25+
kafka --> zookeeper
26+
sentry_web --> sentry_worker["Sentry (worker)"]
27+
sentry_worker --> memcached
28+
sentry_worker --> redis
29+
sentry_worker --> postgres
30+
sentry_worker --> symbolicator
31+
32+
click snuba "https://github.com/getsentry/snuba" "Snuba Documentation"
33+
click relay "https://github.com/getsentry/relay" "Relay Documentation"
34+
```
1335
## Event pipeline
1436

1537
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
2547

2648
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/).
2749

28-
![](https://mermaid.ink/svg/pako:eNp9UsFugzAM_ZUop1Uq4o6mXtbLNO3UXSbSgwluQUCC4qQaovz7QqArbdWdEtvPz_azey51jjzhRwNtwb62QgkFbZt-a2eY_9SlBFtqtWdRtGFnQpUTkwaoQDqzOut7dSzVzzAIVWcTJoa2jFVMVhuMz8xgDZ1Q4QmACg4VpC_v6ohk2cdorfZCBXcAlCESSa3INWhSwXeorOnmALsEBPdpd-BA0BpsjZZIFOHJp45DkcumGSXWaLor6WQzC1RRYGQP-YGU4IQXuieQu6LPiLom00HXBd-D8xnh_21drSmoXAbRLLifeDQnxV8zs3kJQLIGoVkJPi7Br_dGrECQzpmzOgvSRZHltkKZi4Nu0m72JP3AVaEd4djd25-16IWvuUc3UOb-SPuRR3BbYOMxif_meABXW8GFGjwUnNW7TkmeWONwzV2be0G3JfhpGp4coCbvxbz0t_k5HX64_-EXvdQVKA)
29-
[diagram source](https://mermaid.live/edit#pako:eNp9UsFugzAM_ZUop1Uq4o6mXtbLNO3UXSbSgwluQUCC4qQaovz7QqArbdWdEtvPz_azey51jjzhRwNtwb62QgkFbZt-a2eY_9SlBFtqtWdRtGFnQpUTkwaoQDqzOut7dSzVzzAIVWcTJoa2jFVMVhuMz8xgDZ1Q4QmACg4VpC_v6ohk2cdorfZCBXcAlCESSa3INWhSwXeorOnmALsEBPdpd-BA0BpsjZZIFOHJp45DkcumGSXWaLor6WQzC1RRYGQP-YGU4IQXuieQu6LPiLom00HXBd-D8xnh_21drSmoXAbRLLifeDQnxV8zs3kJQLIGoVkJPi7Br_dGrECQzpmzOgvSRZHltkKZi4Nu0m72JP3AVaEd4djd25-16IWvuUc3UOb-SPuRR3BbYOMxif_meABXW8GFGjwUnNW7TkmeWONwzV2be0G3JfhpGp4coCbvxbz0t_k5HX64_-EXvdQVKA)
50+
```mermaid
51+
graph TD
52+
53+
app[Your application] --> |sends crashes| lb{{nginx}}
54+
lb --> |/api/n/store/| relay
55+
relay --> kafka[(Ingest Kafka)]
56+
kafka --> ingest-consumer["Sentry ingest consumer"]
57+
ingest-consumer --> preprocess-event
58+
59+
subgraph celery["Sentry celery tasks"]
60+
preprocess-event --> save-event
61+
preprocess-event --> process-event
62+
preprocess-event --> symbolicate-event
63+
symbolicate-event --> process-event
64+
process-event --> save-event
65+
save-event --> snuba-kafka[("Snuba Kafka<br>(eventstream)")]
66+
end
67+
68+
subgraph snuba["Snuba"]
69+
snuba-kafka --> snuba-consumer["Snuba consumers"]
70+
snuba-consumer --> clickhouse[("Clickhouse")]
71+
end
72+
```
3073

3174
## Multi-Region
3275

@@ -71,8 +114,26 @@ In addition to the siloed modes, there also exists a **Monolith** mode. In monol
71114

72115
### Multi-region architecture
73116

74-
![multi-region architecture](https://mermaid.ink/svg/pako:eNp1UctqwzAQ_JVFpxSSH_ChUOoUeiiEuD5JOajS2hbIktGjJYT8e1dumjotvS2zs_NgT0x5jaxinfUfapAhwWstnHDZ8KfgXUKnoX0-wGZzDzmGsphnFa8j5lAuhIv5rQ9yGgoReNvAHnvj3UE4IEhOpmANuhSO8LC7ik49X9Fi52PqA8a7H_6FgJqvti1s3-kUaplkoVCwhaOKwB8pbvAWGmP9rKGK5RL9Y66K9zdjGeBWnRoCpwSLPpiLOGG_JTEXTVrc9pn5F8J_fdiajRhGaTQ95FSuBEsDjihYRaPGTmabBBPuTFSZk2-OTrEqhYxrlictE9ZGUuaRVZ20kVDUJvnw8vXk-dfnT1dDqnk)
75-
[diagram source](https://mermaid.live/edit#pako:eNp1UctqwzAQ_JVFpxSSH_ChUOoUeiiEuD5JOajS2hbIktGjJYT8e1dumjotvS2zs_NgT0x5jaxinfUfapAhwWstnHDZ8KfgXUKnoX0-wGZzDzmGsphnFa8j5lAuhIv5rQ9yGgoReNvAHnvj3UE4IEhOpmANuhSO8LC7ik49X9Fi52PqA8a7H_6FgJqvti1s3-kUaplkoVCwhaOKwB8pbvAWGmP9rKGK5RL9Y66K9zdjGeBWnRoCpwSLPpiLOGG_JTEXTVrc9pn5F8J_fdiajRhGaTQ95FSuBEsDjihYRaPGTmabBBPuTFSZk2-OTrEqhYxrlictE9ZGUuaRVZ20kVDUJvnw8vXk-dfnT1dDqnk)
117+
```mermaid
118+
flowchart TD
119+
120+
ui[Frontend UI] --> usr
121+
ui --> cs
122+
ui --> eur
123+
124+
125+
subgraph usr [US Region]
126+
usapi[US Sentry API] --> uspg[(US Postgres)]
127+
usapi --> used[(EU Event Data)]
128+
end
129+
subgraph cs [Control Silo]
130+
capi[Control Silo Sentry API] --> cpg[(Control Postgres)]
131+
end
132+
subgraph eur [EU Region]
133+
euapi[EU Sentry API] --> eupg[(EU Postgres)]
134+
euapi --> eued[(EU Event Data)]
135+
end
136+
```
76137

77138
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).
78139

develop-docs/application/control-silo.mdx

+48-7
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,26 @@ When a request is handled by the API Gateway, the response delivered to the clie
4242

4343
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.
4444

45-
![credential-proxy-flowchart](https://mermaid.ink/svg/pako:eNqdk01uwjAQha8y9RoukAWbdsumdOnNKH4Bq_GY2hNBhbh7DUnURJFA7c4ave_Nry-mjg6mMhlfHaTGm-d94mDFCtcaE71j76PsfBvHyGsUTbGdhrb5AxzyjfrV03qzmeAVZYgjn3MH4hZJF-KJMy3lpJFC1j7RVLpE28gFFUXpRUsGClB2rPwMZDfn6gQHUc9tvqVPtyllXboMAxirlqi-8XXvMUB08nqYGloZqfWyEI2fEML56Avw8ihhQpOQDz3x0LPIjlEyng2hO5ZRgXLZLNzo-5eO750KTv-vaX46M51ZmYAU2LtythcrRNboAQHWVOXp0HDXqjVWrkXKncbdt9Sm0tRhZfrehis3VVP2UKJwvjS77b_C_UdcfwDQFR3U)
46-
[diagram source](https://mermaid.live/edit#pako:eNqdk01uwjAQha8y9RoukAWbdsumdOnNKH4Bq_GY2hNBhbh7DUnURJFA7c4ave_Nry-mjg6mMhlfHaTGm-d94mDFCtcaE71j76PsfBvHyGsUTbGdhrb5AxzyjfrV03qzmeAVZYgjn3MH4hZJF-KJMy3lpJFC1j7RVLpE28gFFUXpRUsGClB2rPwMZDfn6gQHUc9tvqVPtyllXboMAxirlqi-8XXvMUB08nqYGloZqfWyEI2fEML56Avw8ihhQpOQDz3x0LPIjlEyng2hO5ZRgXLZLNzo-5eO750KTv-vaX46M51ZmYAU2LtythcrRNboAQHWVOXp0HDXqjVWrkXKncbdt9Sm0tRhZfrehis3VVP2UKJwvjS77b_C_UdcfwDQFR3U)
45+
```mermaid
46+
sequenceDiagram
47+
48+
actor RegionSilo
49+
actor ControlSilo
50+
actor MsTeams
51+
52+
RegionSilo ->> RegionSilo: send issue alert
53+
RegionSilo ->> ControlSilo : send issue alert to msteams
54+
ControlSilo ->> ControlSilo : load integration metadata
55+
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+
```
4765

4866
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:
4967

@@ -121,17 +139,40 @@ where id in (...) and schedule_for < current_timestamp
121139

122140
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.
123141

124-
![mailbox-delivery-flowchart](https://mermaid.ink/svg/pako:eNqNUTtyAzEIvQpD7VxgCzdJm2pbNXjF2owl2EjIn_H47lFiJ5OkcTrgfWB4F5wsMg5Y-a2xTvwitC2UgwZdqLhMspA6PJt6sQSjJPvAfvbwtF7_IsAAs2iETJI2duIKR_EdZK6Vtlz_o07OBaz5X4-5eSsMkZMcuJwfW7UlkjMon_xbBS6ZYbYCvrtDm2TT_rHbuNBRwanuwQ1iIVGgrxuD4gozl97G_tFLUICAfUXmgEMvI8_UkgcMeu1Uam7jWSccvDRe4e3UewA4zJRqn3IUt_J6S-kzrOs7BGObcw)
125-
[diagram source](https://mermaid.live/edit#pako:eNqNUTtyAzEIvQpD7VxgCzdJm2pbNXjF2owl2EjIn_H47lFiJ5OkcTrgfWB4F5wsMg5Y-a2xTvwitC2UgwZdqLhMspA6PJt6sQSjJPvAfvbwtF7_IsAAs2iETJI2duIKR_EdZK6Vtlz_o07OBaz5X4-5eSsMkZMcuJwfW7UlkjMon_xbBS6ZYbYCvrtDm2TT_rHbuNBRwanuwQ1iIVGgrxuD4gozl97G_tFLUICAfUXmgEMvI8_UkgcMeu1Uam7jWSccvDRe4e3UewA4zJRqn3IUt_J6S-kzrOs7BGObcw)
142+
```mermaid
143+
sequenceDiagram
144+
145+
participant Control Silo
146+
147+
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+
```
126152

127153
### Webhook Delivery
128154

129155
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.
130156

131157
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.
132158

133-
![delivery flow chart](https://mermaid.ink/svg/pako:eNqNUrFuAjEM_RUrM1SoapcbWIq6dYE1i0l8XETOviYOokL8e8NBK5CQYIkS-eW9Z_sdjBNPpjGZvguxo0XATcLe8oBJgwsDssKHsCaJsApRbitL2gThS8HyNRCm8_nNT2jgk9R10BF6WEdxW5AWegxxLXvLUWSAVhJhxfSUM27IMsAj0tBCJ7KFkAHXsqPKuAdUpX7QDJ4iKb3cJbpyX3kWFMOO0khWm1GMCrk4V52cnnADn94x8jqbTd9m-zP4keuzr38xipmAUpL0nNb7SQfgiemwS9RT3dVlJIDsIVF2HfkSaRRnb3k8LJuJ6SnVpfiaisNJwxrtKoM1Tb16arFEtcbysUKxqKx-2JlGU6GJKYNH_QuRaVqsbU0M-aCSvs5JGwN3_AUkRNw7)
134-
135-
[diagram source](https://mermaid.live/edit#pako:eNqNUrFuAjEM_RUrM1SoapcbWIq6dYE1i0l8XETOviYOokL8e8NBK5CQYIkS-eW9Z_sdjBNPpjGZvguxo0XATcLe8oBJgwsDssKHsCaJsApRbitL2gThS8HyNRCm8_nNT2jgk9R10BF6WEdxW5AWegxxLXvLUWSAVhJhxfSUM27IMsAj0tBCJ7KFkAHXsqPKuAdUpX7QDJ4iKb3cJbpyX3kWFMOO0khWm1GMCrk4V52cnnADn94x8jqbTd9m-zP4keuzr38xipmAUpL0nNb7SQfgiemwS9RT3dVlJIDsIVF2HfkSaRRnb3k8LJuJ6SnVpfiaisNJwxrtKoM1Tb16arFEtcbysUKxqKx-2JlGU6GJKYNH_QuRaVqsbU0M-aCSvs5JGwN3_AUkRNw7)
159+
```mermaid
160+
sequenceDiagram
161+
participant Control Silo
162+
participant Region Silo
163+
164+
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+
```
136177

137178
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.

develop-docs/application/dynamic-sampling/outcomes.mdx

+17-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,26 @@ These charts illustrate the flow of data categories for transactions:
1313

1414
For a sampled transaction:
1515

16-
![](https://mermaid.ink/img/pako:eNp1UT1vgzAQ_SvWzYAgJoA9ZGJru4StdVWdwCGWwI4c04Yi_nsNDI2U1l589z58TzdBbRoJHE6d-arPaB15PgpN_KnKJxKGzqK-Yu2U0WF4IEfZ4bjh6_ORUVZv5aixVzWpsL90Srfv_wo-lG7kTTabcKOV1YNp5YyVf6N3DncsoZcLAfTS9qgaH3BaEPGbUwAnk2_Ug_2USyHAzyrRCiCz0LMX4-BMNeoauLODDGC4NOhkqbC12AM_YXf13Qtq4BPcgCcJi2gRs13BaLYvkl0RwAg8zVjEWBonOaVZwWI6B_BtjHeIo32esyyOk5SmdJcleQCyUT7Hy7aVdTkBWDO05_sPX1f5MtX8Azhkjhw)
16+
```mermaid
17+
flowchart LR
18+
SDK --transaction--> Relay
19+
Relay --transaction--> DS[Dynamic Sampling]
20+
Relay --transaction_indexed--> DS
21+
DS --transaction-->Store
22+
DS --transaction_indexed-->Store
23+
```
1724

1825
For a transaction filtered by dynamic sampling:
1926

20-
![](https://mermaid.ink/img/pako:eNp1UcFSgzAQ_ZXMeoVOaCiQHDxxUy_lpnGcDGzbKCSdNGiR4d8N5WBnqskl-_a9t9ndEWrbIAjYtfarPijnyeNWGhJOVT6QOPZOmZOqvbYmju_JFls1LPnL85ZRVi_lYFSna1Kp7thqs3_9V_CmTYNnbBbhQiurG9PKW4d_Z68ctviOtV9oJz-0SBYkBM5-oLjbUSrNfCGCDl2ndBM6H2eF_B2ABEHGANS9-8Q5kBCaQOUkkEmaKYhV7201mBqEdz1G0B8b5bHUau9UB2Kn2lNAj8qAGOEMIkn4ihWUrwvOsk2RrIsIBhBpxlecpzTJGcsKTtkUwbe1wYGuNnnOM0qTlKVsnSV5BNjoMIanZV2XrUXgbL8_XBd8vsjnX00_t7aW9Q)
27+
```mermaid
28+
flowchart LR
29+
SDK --transaction--> Relay
30+
Relay --transaction--> DS[Dynamic Sampling]
31+
Relay --transaction_indexed--> DS
32+
DS --transaction-->Store
33+
DS --transaction_indexed-->Reject
34+
style Reject stroke:#f00
35+
```
2136

2237
## Data Types
2338

develop-docs/application/feedback-architecture.mdx

+68-8
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,15 @@ event[”contexts”][”feedback”] = {
7474

7575
### Ingest diagram
7676

77-
![](https://mermaid.ink/svg/pako:eNptkc1qwzAQhF9F7MmGmN59KJSmx_ZQ91IsYxR5YwvbkqqfgEny7l05NW0hOg3a0erb2TNI0yGU0DthB_ax55rREdbWnyY69mTtpKQIyuiGFcUju3BAfcLJWORwYe84iYVrHlaxOo6tNNrHGV1WK92jD8URsTsIORZ4Qh18k6cXv76t8VfEiJ4JzyRO6BYWhB_TL9KhCNhubVrlfcTU425hbWf-UHD44TBSRudQS_QcbhTmP4WmNHwwDuvsbZN5c8dIuC9pmCoQwpwgvY4HUWccqiQenim3cTDRU055Azugl7NQHWV9TiFzCAPOVCxJTqofAgeur2QUMZhq0RLK4CLuINqOhtwrQTuat0vsFLG93pa37vD6DRJvo7g)
78-
[diagram source](https://mermaid.live/edit#pako:eNptkc1qwzAQhF9F7MmGmN59KJSmx_ZQ91IsYxR5YwvbkqqfgEny7l05NW0hOg3a0erb2TNI0yGU0DthB_ax55rREdbWnyY69mTtpKQIyuiGFcUju3BAfcLJWORwYe84iYVrHlaxOo6tNNrHGV1WK92jD8URsTsIORZ4Qh18k6cXv76t8VfEiJ4JzyRO6BYWhB_TL9KhCNhubVrlfcTU425hbWf-UHD44TBSRudQS_QcbhTmP4WmNHwwDuvsbZN5c8dIuC9pmCoQwpwgvY4HUWccqiQenim3cTDRU055Azugl7NQHWV9TiFzCAPOVCxJTqofAgeur2QUMZhq0RLK4CLuINqOhtwrQTuat0vsFLG93pa37vD6DRJvo7g)
77+
```mermaid
78+
graph TD
79+
app[Your Application] --> |"envelope"| Relay
80+
Relay --> f_consumer([ingest-feedback-events])
81+
f_consumer --> |"queues as celery task"| create_feedback_issue
82+
create_feedback_issue --> o_consumer(["ingest-occurrences"])
83+
o_consumer --> nodestore[(Nodestore)]
84+
o_consumer --> |"EventStream"| snuba[("Snuba/Clickhouse")]
85+
```
7986

8087
In Relay v24.5.1, we migrated feedback to its own kafka topic + consumer,
8188
`ingest-feedback-events`. This decouples risk and ownership from errors
@@ -114,8 +121,39 @@ user_report = {
114121

115122
### Ingest diagram
116123

117-
![](https://mermaid.ink/svg/pako:eNp9VNtq3DAQ_ZVBEHAgy77vQ6EkDfShF7KhUKzFaOXZtYgtqbpsCUn-vaOxvWmT3frF4-HozJkzIz8J7VoUK7EPyndwfyOtTDFvx8812hQeS0qmgN6F1KBtvTM21VIsc8Sw2CG2W6UfpNiMQB1U7JoJPrhW9YS9Lkm44yT8MPh7ghMdvf6uuctWJ-NsrG_nCBYQsgVjIeAOQ8AwlYrqgE1RMVYrSaAndmZokmuO0iZdqBIek42JMeNJHlgsPsCzFJ9vAQ9kAfjgNMaIrRTPZ9jfZpnjbMlj2xcXgPaAvfMI3njsjWWA8r7-6XKAj973Rqviw2bWNZ8oau6wVzwhDhihSIc3uqqN3WNMC5WS0t1AjcTNJZOPAAa_t3BWNc4ZlG2BRwojIk7yZjHfv63vi5A3-3GG_NTJ9wvzX2VsYgTfq7RzYSjZkz4ziWs0LVAeMFS0hZMhTutMrJZmSmvIlrzi-JilSxGTC1hXX-fwcnMCSG18KiuypvuhBl4Pm7eqrtbltbym2T10jrrg02MDpafJLm4yLrNvST87e2oVvYtpHzDWFZk2xVKMerjcLOVXxmDIG95aFs2K_qUUV4LUD8q0dO2fpAWQInU4EHZFYW_2XZJC2hcCqpzc-tFqsUoh45UYhd4YRXd1EKud6iNlsTVU68v4I-H_ycsfwTWaqg)
118-
[diagram source](https://mermaid.live/edit#pako:eNp9VNtq3DAQ_ZVBEHAgy77vQ6EkDfShF7KhUKzFaOXZtYgtqbpsCUn-vaOxvWmT3frF4-HozJkzIz8J7VoUK7EPyndwfyOtTDFvx8812hQeS0qmgN6F1KBtvTM21VIsc8Sw2CG2W6UfpNiMQB1U7JoJPrhW9YS9Lkm44yT8MPh7ghMdvf6uuctWJ-NsrG_nCBYQsgVjIeAOQ8AwlYrqgE1RMVYrSaAndmZokmuO0iZdqBIek42JMeNJHlgsPsCzFJ9vAQ9kAfjgNMaIrRTPZ9jfZpnjbMlj2xcXgPaAvfMI3njsjWWA8r7-6XKAj973Rqviw2bWNZ8oau6wVzwhDhihSIc3uqqN3WNMC5WS0t1AjcTNJZOPAAa_t3BWNc4ZlG2BRwojIk7yZjHfv63vi5A3-3GG_NTJ9wvzX2VsYgTfq7RzYSjZkz4ziWs0LVAeMFS0hZMhTutMrJZmSmvIlrzi-JilSxGTC1hXX-fwcnMCSG18KiuypvuhBl4Pm7eqrtbltbym2T10jrrg02MDpafJLm4yLrNvST87e2oVvYtpHzDWFZk2xVKMerjcLOVXxmDIG95aFs2K_qUUV4LUD8q0dO2fpAWQInU4EHZFYW_2XZJC2hcCqpzc-tFqsUoh45UYhd4YRXd1EKud6iNlsTVU68v4I-H_ycsfwTWaqg)
124+
```mermaid
125+
graph TD
126+
subgraph Sentry
127+
report_endpoint["/user-feedback"]
128+
crash_report_modal["Crash Report View"]
129+
end
130+
131+
subgraph functions[Functions - run in referrer]
132+
save_userreport
133+
shim_to_feedback
134+
create_feedback_issue
135+
save_userreport --> |"IF event processed"| shim_to_feedback
136+
shim_to_feedback --> create_feedback_issue
137+
end
138+
139+
%% envelope pipeline
140+
app[Your Application] --> |"envelope"| Relay
141+
Relay --> a_topic([ingest-attachments])
142+
a_topic --> save_userreport
143+
144+
%% endpoint and crash reports
145+
app --> |"POST"| report_endpoint --> save_userreport
146+
app --> |"POST"| crash_report_modal --> save_userreport
147+
148+
%% issues platform
149+
create_feedback_issue --> o_consumer(["ingest-occurrences"])
150+
o_consumer --> nodestore[(Nodestore)]
151+
o_consumer --> |"EventStream"| snuba[(Snuba/Clickhouse)]
152+
153+
%% user report saves/updates
154+
save_userreport --> postgres[("Postgres")]
155+
snuba --> |"queries eventstore"| save_userreport
156+
```
119157

120158
<br />
121159

@@ -134,8 +172,14 @@ added a post process job to the errors pipeline: [`link_event_to_user_report()`]
134172
This is the 5th, automated way of creating feedback.
135173

136174
Simplified diagram:
137-
![](https://mermaid.ink/svg/pako:eNpdULtuwzAM_BWBUwIkzm4UXZq1QIF0MwNDlllLTfSoKAUokvx7ZasZWi06kMfj8a6g_EjQwhRl0OJ9j06Ux9rYPvn-g2gcpDqJ7fZZ3BCapkG4CXZ5kN3qMH-7l7NRJ-0z0_qIDtPSfAx8ZYqGWNCFXOLkI83zIfSffqirKu4QKEYfWQTPSYToFTGLmQVH8fRXbZfDKBPxIlXoUyTuVghvvxihOqnSi5X_B9XdsAFL0UozlgSucw0habLFZFvg2Uw6IaC7F6LMyR--nYI2xUwbqB72Rpbk7KNIoyk3vtZIl2TvP_9DeX4)
138-
[diagram source](https://mermaid.live/edit#pako:eNpdULtuwzAM_BWBUwIkzm4UXZq1QIF0MwNDlllLTfSoKAUokvx7ZasZWi06kMfj8a6g_EjQwhRl0OJ9j06Ux9rYPvn-g2gcpDqJ7fZZ3BCapkG4CXZ5kN3qMH-7l7NRJ-0z0_qIDtPSfAx8ZYqGWNCFXOLkI83zIfSffqirKu4QKEYfWQTPSYToFTGLmQVH8fRXbZfDKBPxIlXoUyTuVghvvxihOqnSi5X_B9XdsAFL0UozlgSucw0habLFZFvg2Uw6IaC7F6LMyR--nYI2xUwbqB72Rpbk7KNIoyk3vtZIl2TvP_9DeX4)
175+
176+
```mermaid
177+
graph TD
178+
shim_to_feedback --> |"..."| snuba[(Snuba/Clickhouse)]
179+
snuba --> |"queries eventstore"| pp_job
180+
pp_job["errors post process job"] <--> |"queries/updates"| postgres[("Postgres")]
181+
pp_job --> shim_to_feedback
182+
```
139183

140184
<br />
141185

@@ -179,8 +223,24 @@ Crash reports are also shimmed to feedback. The pipeline is the same as the
179223

180224
## Sentry UI
181225

182-
![](https://mermaid.ink/svg/pako:eNp9Uj1vwjAQ_SvWTUECsWdgKaViqFQVmDhUmeRILBI7tc8DAv577YRAG6F68fn53b37OkNmcoIUCiubUqznqEU4zu87YMXGyoJcB8fTGMeFJbdNED5utkg2juwnNcayGyGMdg--034vt8kqXtOXSmXH0nhHPYV03hmokR-ypNmeIoSsnPPkvgKxMUrzFmHaQQi7pwwxmczEBeHtdY1wEV4FlwVRvpfZUWyWIpkebq_RPYRtc_8jEpK0k57ZEvuSBuSB3u23lV3GzMScWKrKRe2ZiJ0Si2dh_y_jHvZX3zqzn0jv8O3JqtieyzDTtsdxEE-oA3UYQ022lioPy3GOQghcUk0IaTArVZSMgPoaiNKzWZ10BilbT2PwTS6Z5kqGYdaQHmTlAkq5Csv03q1bu3XXH4El2dU)
183-
[diagram source](https://mermaid.live/edit#pako:eNp9Uj1vwjAQ_SvWTUECsWdgKaViqFQVmDhUmeRILBI7tc8DAv577YRAG6F68fn53b37OkNmcoIUCiubUqznqEU4zu87YMXGyoJcB8fTGMeFJbdNED5utkg2juwnNcayGyGMdg--034vt8kqXtOXSmXH0nhHPYV03hmokR-ypNmeIoSsnPPkvgKxMUrzFmHaQQi7pwwxmczEBeHtdY1wEV4FlwVRvpfZUWyWIpkebq_RPYRtc_8jEpK0k57ZEvuSBuSB3u23lV3GzMScWKrKRe2ZiJ0Si2dh_y_jHvZX3zqzn0jv8O3JqtieyzDTtsdxEE-oA3UYQ022lioPy3GOQghcUk0IaTArVZSMgPoaiNKzWZ10BilbT2PwTS6Z5kqGYdaQHmTlAkq5Csv03q1bu3XXH4El2dU)
226+
```mermaid
227+
graph TD
228+
subgraph Storages
229+
postgres[("Postgres (UserReports)")]
230+
snuba[(Snuba/Clickhouse)]
231+
end
232+
233+
subgraph Sentry
234+
issues_endpoint["/issues"]
235+
issues_endpoint --> |"GET"| ui["Feedback UI (/feedback)"]
236+
report_endpoint["/user-feedback"]
237+
report_endpoint --> |"GET"| report_ui["Issue Details UI > User Feedback"]
238+
issues_endpoint --> |"GET"| report_ui
239+
end
240+
241+
postgres --> |"queries"| report_endpoint
242+
snuba --> |"queries"| issues_endpoint
243+
```
184244

185245
You can view the user reports related to a specific issue at the "User Feedback"
186246
tab of Issue Details. This excludes "new" feedback (anything sent from the widget).

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
"js-yaml": "^4.1.0",
7272
"match-sorter": "^6.3.4",
7373
"mdx-bundler": "^10.0.1",
74+
"mermaid": "^11.4.0",
7475
"micromark": "^4.0.0",
7576
"next": "14.2.4",
7677
"next-mdx-remote": "^4.4.1",

0 commit comments

Comments
 (0)