Skip to content

chore: pass frontend Sentry DSN#2005

Merged
latin-panda merged 5 commits into
nextfrom
adds-env-var-sentry-frontend
Jun 22, 2026
Merged

chore: pass frontend Sentry DSN#2005
latin-panda merged 5 commits into
nextfrom
adds-env-var-sentry-frontend

Conversation

@latin-panda

@latin-panda latin-panda commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Follow-up from this work: getodk/web-forms#803 (PR#1610)

What has been done to verify that this works as intended?

Unit tests are passing. Docker is built with the correct client-config.json

Why is this the best possible solution? Were any other approaches considered?

It follows the same pattern as other variables are passed.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Does this change require updates to documentation? If so, please file an issue here and include the link below.

Documented in the README file.

Before submitting this PR, please make sure you have:

  • branched off and targeted the next branch OR only changed documentation/infrastructure (master is stable and used in production)
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

@lognaturel lognaturel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to make sure you’ve see #1998 in case it intersects!

Comment thread .env.template Outdated
# SENTRY_TRACE_RATE=

# Optional: configure frontend error reporting
# Set to your Sentry DSN before `docker compose build` to embed it in the frontend bundle.

@lognaturel lognaturel Jun 18, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can put the second line in docs instead of here!

I haven’t looked deeply at how things are wired but wanted to flag that we’re working to switch to using a pre-built bundle in this release. So no problem if the var needs to be built into the image but it won’t be accessible for bundling.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand, if #1998 lands, we won't be able to pass the DNS during build time, which is ideal, especially if we prefer not to track self-hosted instances.
@alxndrsn do you have a suggestion?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is #1998 planned for this release?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1998 is currently planned for this release because it addresses the significant increase in build memory needed after the Web Forms merger.

I think what would make the most sense for now is to include the DSN in /client-config.json to match the OIDC config.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@latin-panda latin-panda changed the title chore: pass frontend Sentry DSN variable at build time chore: pass frontend Sentry DSN Jun 19, 2026
@latin-panda latin-panda requested a review from alxndrsn June 19, 2026 11:09
@latin-panda

Copy link
Copy Markdown
Contributor Author

@alxndrsn Could you please review when you have time?

PR to pass the DSN to the central-frontend
Issue for adding a proxy in the future

Comment thread test/nginx/lib.docker-compose.yml Outdated
Comment thread test/nginx/src/mocha/nginx.spec.js Outdated

@alxndrsn alxndrsn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments in-line.

@latin-panda latin-panda requested a review from alxndrsn June 22, 2026 05:06
@latin-panda

Copy link
Copy Markdown
Contributor Author

@alxndrsn this is ready for another look! Thanks!

Comment thread test/nginx/lib.docker-compose.yml Outdated
alxndrsn

This comment was marked as resolved.

@latin-panda latin-panda requested a review from alxndrsn June 22, 2026 14:10
@latin-panda latin-panda merged commit 883431c into next Jun 22, 2026
14 checks passed
@latin-panda latin-panda deleted the adds-env-var-sentry-frontend branch June 22, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants