Merge pull request #72 from simple-login/front-end-sentry
use another sentry project for the front-end with SENTRY_FRONT_END_DSN
This commit is contained in:
commit
95dc1ab831
|
@ -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