Skip to content

Commit 38090c0

Browse files
authored
fix(gateway): preserve inbound event fidelity for Sentry and Linear sources (#124)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
1 parent 85f57e0 commit 38090c0

15 files changed

Lines changed: 1186 additions & 2 deletions

File tree

devops/docker/compose/.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
# TROGON_SOURCE_NOTION_STREAM_MAX_AGE_SECS=604800
4242
# TROGON_SOURCE_NOTION_NATS_ACK_TIMEOUT_SECS=10
4343

44+
# --- Sentry Source ---
45+
# TROGON_SOURCE_SENTRY_CLIENT_SECRET=
46+
# TROGON_SOURCE_SENTRY_SUBJECT_PREFIX=sentry
47+
# TROGON_SOURCE_SENTRY_STREAM_NAME=SENTRY
48+
# TROGON_SOURCE_SENTRY_STREAM_MAX_AGE_SECS=604800
49+
# TROGON_SOURCE_SENTRY_NATS_ACK_TIMEOUT_SECS=1
50+
4451
# --- Discord Source ---
4552
# TROGON_SOURCE_DISCORD_BOT_TOKEN=
4653
# TROGON_SOURCE_DISCORD_GATEWAY_INTENTS=guilds,guild_members,guild_messages,guild_message_reactions,direct_messages,message_content,guild_voice_states

devops/docker/compose/services/trogon-gateway/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ prefix:
1616
| incident.io | `/incidentio/webhook` | `TROGON_SOURCE_INCIDENTIO_SIGNING_SECRET` |
1717
| Linear | `/linear/webhook` | `TROGON_SOURCE_LINEAR_WEBHOOK_SECRET` |
1818
| Notion | `/notion/webhook` | `TROGON_SOURCE_NOTION_VERIFICATION_TOKEN` |
19+
| Sentry | `/sentry/webhook` | `TROGON_SOURCE_SENTRY_CLIENT_SECRET` |
1920

2021
The gateway port is configured via `TROGON_GATEWAY_PORT` (default `8080`).
2122
Liveness and readiness probes are available at `GET /-/liveness` and `GET /-/readiness`.
@@ -67,6 +68,13 @@ then point the Notion webhook endpoint at `/notion/webhook`. Verified events
6768
are forwarded to NATS on `{subject_prefix}.{type}` subjects such as
6869
`notion.page.created`.
6970

71+
## Sentry webhooks
72+
73+
Sentry integration-platform webhooks sign the raw JSON body with the app client
74+
secret. Configure `TROGON_SOURCE_SENTRY_CLIENT_SECRET`, point the webhook URL
75+
at `/sentry/webhook`, and the gateway will forward verified payloads to NATS on
76+
`{subject_prefix}.{resource}.{action}` subjects such as `sentry.issue.created`.
77+
7078
## Exposing webhooks with ngrok
7179

7280
```bash

rsworkspace/Cargo.lock

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rsworkspace/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ trogon-source-gitlab = { path = "crates/trogon-source-gitlab" }
2121
trogon-source-incidentio = { path = "crates/trogon-source-incidentio" }
2222
trogon-source-linear = { path = "crates/trogon-source-linear" }
2323
trogon-source-notion = { path = "crates/trogon-source-notion" }
24+
trogon-source-sentry = { path = "crates/trogon-source-sentry" }
2425
trogon-source-slack = { path = "crates/trogon-source-slack" }
2526
trogon-source-telegram = { path = "crates/trogon-source-telegram" }
2627
trogon-std = { path = "crates/trogon-std" }

rsworkspace/crates/trogon-gateway/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ trogon-source-gitlab = { workspace = true }
2727
trogon-source-incidentio = { workspace = true }
2828
trogon-source-linear = { workspace = true }
2929
trogon-source-notion = { workspace = true }
30+
trogon-source-sentry = { workspace = true }
3031
trogon-source-slack = { workspace = true }
3132
trogon-source-telegram = { workspace = true }
3233
trogon-std = { workspace = true, features = ["clap", "telemetry-http"] }

0 commit comments

Comments
 (0)