Files
gh-christianlouis-docuelevate/app
copilot-swe-agent[bot] b202f10e1a feat(ui): add Sentry Browser SDK client-side integration
- Add 3 new config fields for browser SDK sample rates:
  sentry_js_traces_sample_rate (default 0.0),
  sentry_js_replay_session_sample_rate (default 0.0),
  sentry_js_replay_on_error_sample_rate (default 0.1)
- Expose Sentry config to Jinja2 templates via _inject_global_context;
  empty-string DSN normalized to None so {% if sentry_dsn %} guard works
- Load Sentry Browser SDK bundle.tracing.replay.min.js from the official
  Sentry CDN in base.html when SENTRY_DSN is configured, with Sentry.init()
  for error capture, browser tracing and session replay
- Register new JS settings fields in SETTING_METADATA so they appear on the
  admin Settings → Observability page
- Update .env.demo with commented-out examples for SENTRY_JS_* variables
- Update docs/ConfigurationGuide.md and docs/SentrySetup.md with full
  browser SDK documentation, env-specific examples and troubleshooting
- Add TestSentryJsTemplateContext (5 tests) and TestSentryJsConfig (4 tests)

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/4a945567-67df-4264-aaed-75eb2e236e9c
2026-03-22 14:13:10 +00:00
..