Skip to content

feat: Support self-hosted Sentry via DSN#1765

Closed
aryanjsingh wants to merge 1 commit intogetodk:masterfrom
aryanjsingh:fix/issue-1489-support-for-self-hosted-sentry
Closed

feat: Support self-hosted Sentry via DSN#1765
aryanjsingh wants to merge 1 commit intogetodk:masterfrom
aryanjsingh:fix/issue-1489-support-for-self-hosted-sentry

Conversation

@aryanjsingh
Copy link
Copy Markdown

Summary

This change updates the Sentry configuration to use a DSN (Data Source Name) instead of separate fields for organization, key, and project. This allows users to configure Central with self-hosted Sentry instances. The Nginx configuration has been updated to parse the DSN to construct the CSP reporting endpoint, and the setup is now more robust when Sentry is not configured.

Changes

  • .env.template: Replaced SENTRY_ORG_SUBDOMAIN, SENTRY_KEY, and SENTRY_PROJECT with SENTRY_DSN to support self-hosted Sentry instances, which is the standard way to configure Sentry clients.
  • files/nginx/odk.conf.template: Updated the /csp-report location block to use a single SENTRY_CSP_ENDPOINT variable. This variable will be constructed from the SENTRY_DSN in the setup-odk.sh script, allowing for flexible Sentry endpoint configuration.
  • files/nginx/setup-odk.sh: Added logic to parse the SENTRY_DSN environment variable to construct the Sentry CSP endpoint URL. Also added a fallback for when SENTRY_DSN is not set, which makes the Nginx configuration robust by replacing the Sentry proxy block with a simple return 204 to gracefully handle CSP reports.
  • files/service/config.json.template: Updated the backend service configuration to accept a Sentry dsn instead of separate orgSubdomain, key, and project fields. This aligns with the move to a single DSN for Sentry configuration.

Related Issue

Closes #1489

@brontolosone brontolosone moved this to 📥 inbox in ODK Central Apr 4, 2026
@aryanjsingh aryanjsingh closed this Apr 4, 2026
@brontolosone
Copy link
Copy Markdown
Contributor

@aryanjsingh, as you closed your PR: are you no longer interested in support for self-hosted sentry? Or are you thinking about some other way to accomplish same?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📥 inbox

Development

Successfully merging this pull request may close these issues.

Support for self-hosted Sentry

2 participants