mirror of
https://github.com/simple-login/app.git
synced 2025-02-22 14:53:34 +08:00
use another sentry project for the front-end using SENTRY_FRONT_END_DSN param
This commit is contained in:
parent
6fe689dc17
commit
ec248dcae6
3 changed files with 14 additions and 1 deletions
|
@ -39,6 +39,9 @@ print(">>> URL:", URL)
|
|||
|
||||
SENTRY_DSN = os.environ.get("SENTRY_DSN")
|
||||
|
||||
# can use another sentry project for the front-end to avoid noises
|
||||
SENTRY_FRONT_END_DSN = os.environ.get("SENTRY_FRONT_END_DSN") or SENTRY_DSN
|
||||
|
||||
# Email related settings
|
||||
NOT_SEND_EMAIL = "NOT_SEND_EMAIL" in os.environ
|
||||
EMAIL_DOMAIN = os.environ["EMAIL_DOMAIN"]
|
||||
|
|
|
@ -4,6 +4,10 @@ URL=http://localhost:7777
|
|||
# If you want to enable sentry for error tracking, put your sentry dsn here.
|
||||
# SENTRY_DSN=your_sentry_dsn
|
||||
|
||||
# Possible to use another sentry project for the front-end to avoid noises
|
||||
# If not set, fallback to SENTRY_DSN
|
||||
# SENTRY_FRONT_END_DSN=your_sentry_dsn
|
||||
|
||||
# apply colored log to facilitate local development
|
||||
# COLOR_LOG=true
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ from app.config import (
|
|||
RESET_DB,
|
||||
FLASK_PROFILER_PATH,
|
||||
FLASK_PROFILER_PASSWORD,
|
||||
SENTRY_FRONT_END_DSN,
|
||||
)
|
||||
from app.dashboard.base import dashboard_bp
|
||||
from app.developer.base import developer_bp
|
||||
|
@ -301,7 +302,12 @@ def jinja2_filter(app):
|
|||
|
||||
@app.context_processor
|
||||
def inject_stage_and_region():
|
||||
return dict(YEAR=arrow.now().year, URL=URL, SENTRY_DSN=SENTRY_DSN, VERSION=SHA1)
|
||||
return dict(
|
||||
YEAR=arrow.now().year,
|
||||
URL=URL,
|
||||
SENTRY_DSN=SENTRY_FRONT_END_DSN,
|
||||
VERSION=SHA1,
|
||||
)
|
||||
|
||||
|
||||
def setup_paddle_callback(app: Flask):
|
||||
|
|
Loading…
Reference in a new issue