-
-
Notifications
You must be signed in to change notification settings - Fork 1
devservices: add config for proxy and ingest-router #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| x-sentry-service-config: | ||
| version: 0.1 | ||
| service_name: synapse | ||
| description: Cell routing services (proxy + ingest-router). | ||
| modes: | ||
| default: | ||
| - synapse-proxy | ||
| - synapse-ingest-router | ||
|
|
||
| services: | ||
| synapse-proxy: | ||
| image: us-docker.pkg.dev/sentryio/synapse/image:latest | ||
| command: ["proxy", "--config-file-path", "/app/proxy.yaml"] | ||
| ports: | ||
| - "13000:3000" | ||
| - "13001:3001" | ||
| volumes: | ||
| - ./proxy.yaml:/app/proxy.yaml:ro | ||
| - synapse-proxy-cache:/tmp/synapse-cache | ||
| networks: | ||
| - devservices | ||
| restart: unless-stopped | ||
|
|
||
| synapse-ingest-router: | ||
| image: us-docker.pkg.dev/sentryio/synapse/image:latest | ||
| command: ["ingest-router", "--config-file-path", "/app/ingest-router.yaml"] | ||
| ports: | ||
| - "13002:3000" | ||
| - "13003:3001" | ||
| volumes: | ||
| - ./ingest-router.yaml:/app/ingest-router.yaml:ro | ||
| - synapse-ingest-router-cache:/tmp/synapse-cache | ||
| networks: | ||
| - devservices | ||
| restart: unless-stopped | ||
|
|
||
| volumes: | ||
| synapse-proxy-cache: | ||
| synapse-ingest-router-cache: | ||
|
|
||
| networks: | ||
| devservices: | ||
| name: devservices | ||
| external: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| ingest_router: | ||
| listener: | ||
| host: "0.0.0.0" | ||
| port: 3000 | ||
| admin_listener: | ||
| host: "0.0.0.0" | ||
| port: 3001 | ||
|
|
||
| locator: | ||
| type: in_process | ||
| control_plane: | ||
| url: http://host.docker.internal:8000 | ||
| backup_route_store: | ||
| type: filesystem | ||
| base_dir: /tmp/synapse-cache | ||
| filename: backup.bin | ||
| compression: zstd1 | ||
| localities: | ||
| - "--monolith--" | ||
| locality_to_default_cell: | ||
| "--monolith--": "--monolith--" | ||
|
|
||
| locales: | ||
| "--monolith--": | ||
| - id: "--monolith--" | ||
| sentry_url: http://host.docker.internal:8000 | ||
| relay_url: http://relay:7899 | ||
|
|
||
| routes: | ||
| - match: | ||
| host: localhost | ||
| path: /api/0/relays/projectconfigs/ | ||
| method: POST | ||
| action: | ||
| handler: relay_project_configs | ||
| locale: "--monolith--" | ||
| - match: | ||
| host: localhost | ||
| path: /api/0/relays/live/ | ||
| method: GET | ||
| action: | ||
| handler: health | ||
| locale: "--monolith--" | ||
| - match: | ||
| host: localhost | ||
| path: /api/0/relays/register/challenge/ | ||
| method: POST | ||
| action: | ||
| handler: register_challenge | ||
| locale: "--monolith--" | ||
| - match: | ||
| host: localhost | ||
| path: /api/0/relays/register/response/ | ||
| method: POST | ||
| action: | ||
| handler: register_response | ||
| locale: "--monolith--" | ||
| - match: | ||
| host: localhost | ||
| path: /api/0/relays/publickeys/ | ||
| method: POST | ||
| action: | ||
| handler: public_keys | ||
| locale: "--monolith--" | ||
|
|
||
| metrics: | ||
| statsd_host: "127.0.0.1" | ||
| statsd_port: 8126 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| proxy: | ||
| listener: | ||
| host: "0.0.0.0" | ||
| port: 3000 | ||
| admin_listener: | ||
| host: "0.0.0.0" | ||
| port: 3001 | ||
| locator: | ||
| type: in_process | ||
| control_plane: | ||
| url: http://host.docker.internal:8000 | ||
| backup_route_store: | ||
| type: filesystem | ||
| base_dir: /tmp/synapse-cache | ||
| filename: backup.bin | ||
| compression: zstd1 | ||
| localities: | ||
| - "--monolith--" | ||
| locality_to_default_cell: | ||
| "--monolith--": "--monolith--" | ||
| upstreams: | ||
| - name: sentry-dev-monolith | ||
| url: http://host.docker.internal:8000 | ||
| routes: | ||
| - match: | ||
| host: localhost | ||
| path: /organizations/{organization}/* | ||
| action: | ||
| resolver: cell_from_organization | ||
| cell_to_upstream: | ||
| "--monolith--": sentry-dev-monolith | ||
| # default: sentry-dev-monolith | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Commenting out the Suggested FixUncomment the Prompt for AI Agent |
||
|
|
||
| metrics: | ||
| statsd_host: "127.0.0.1" | ||
| statsd_port: 8126 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proxy route host match fails with non-standard port
Medium Severity
The proxy route specifies
host: localhost, but the proxy's host matching logic inroute_actions.rscompares the rawHostheader value directly — it does not strip the port. For HTTP/1.1 requests tolocalhost:13000, theHostheader islocalhost:13000, which won't equallocalhost, so the route silently fails to match and returns a 404. The ingest-router correctly strips ports before comparing, but the proxy does not. Removing thehostconstraint or including the port would fix this.Additional Locations (1)
devservices/ingest-router.yaml#L30-L31Reviewed by Cursor Bugbot for commit cbd756b. Configure here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One other thing to think about is that our local dev environments run sentry on
dev.getsentry.netand not on localhost.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah -- i think i'll need to test these against real sentry/relay to figure out the right values for the route config. for now, the whole block is just copy paste from the local config