Features: 1) Extend ignored errors in Sentry when DEBUG mode is enabled;
Fixes: None; Extra: 1) Refactor ignored errors list to conditionally include additional exceptions in DEBUG mode;
This commit is contained in:
parent
37c0867ab7
commit
4a97779139
1 changed files with 4 additions and 1 deletions
|
|
@ -298,13 +298,16 @@ if getenv("SENTRY_DSN"):
|
||||||
"flower.views.error.NotFoundErrorHandler",
|
"flower.views.error.NotFoundErrorHandler",
|
||||||
"django.http.response.Http404",
|
"django.http.response.Http404",
|
||||||
"billiard.exceptions.SoftTimeLimitExceeded",
|
"billiard.exceptions.SoftTimeLimitExceeded",
|
||||||
"billiard.exceptions.WorkerLostError",
|
|
||||||
"core.models.Product.DoesNotExist",
|
"core.models.Product.DoesNotExist",
|
||||||
"core.models.Category.DoesNotExist",
|
"core.models.Category.DoesNotExist",
|
||||||
"core.models.Brand.DoesNotExist",
|
"core.models.Brand.DoesNotExist",
|
||||||
"blog.models.Post.DoesNotExist",
|
"blog.models.Post.DoesNotExist",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if DEBUG:
|
||||||
|
ignore_errors.extend(["billiard.exceptions.WorkerLostError",
|
||||||
|
"billiard.exceptions.TimeLimitExceeded"])
|
||||||
|
|
||||||
sentry_sdk.init(
|
sentry_sdk.init(
|
||||||
dsn=getenv("SENTRY_DSN"),
|
dsn=getenv("SENTRY_DSN"),
|
||||||
traces_sample_rate=1.0 if DEBUG else 0.2,
|
traces_sample_rate=1.0 if DEBUG else 0.2,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue