mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-05 14:58:26 -04:00
Merge pull request #4117 from alphagov/silence-python-client-180766893
Silence errors from Python Client
This commit is contained in:
@@ -3,6 +3,7 @@ import os
|
|||||||
import sentry_sdk
|
import sentry_sdk
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from sentry_sdk.integrations.flask import FlaskIntegration
|
from sentry_sdk.integrations.flask import FlaskIntegration
|
||||||
|
from sentry_sdk.integrations import logging
|
||||||
|
|
||||||
from app import create_app
|
from app import create_app
|
||||||
|
|
||||||
@@ -13,7 +14,9 @@ sentry_sdk.init(
|
|||||||
attach_stacktrace=True,
|
attach_stacktrace=True,
|
||||||
traces_sample_rate=0.00005 # avoid exceeding rate limits in Production
|
traces_sample_rate=0.00005 # avoid exceeding rate limits in Production
|
||||||
)
|
)
|
||||||
|
|
||||||
sentry_sdk.set_level('error') # only record error logs or exceptions
|
sentry_sdk.set_level('error') # only record error logs or exceptions
|
||||||
|
logging.ignore_logger('notifications_python_client.*') # ignore logs about 404s, etc.
|
||||||
|
|
||||||
application = Flask('app')
|
application = Flask('app')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user