Skip to content

Commit 26ce31f

Browse files
authored
Re-enable Sentry logging integration (#366)
1 parent 1d60611 commit 26ce31f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎build_docs.py‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,15 @@ def main() -> int:
10961096
setup_logging(args.log_directory, args.select_output)
10971097
load_environment_variables()
10981098
if sentry_sdk:
1099-
sentry_sdk.init()
1099+
from sentry_sdk.integrations.logging import LoggingIntegration
1100+
1101+
sentry_sdk.init(
1102+
integrations=[
1103+
# Not enabled by default since sentry-sdk 3.0.
1104+
# level=None: don't ship every INFO line as a Sentry log.
1105+
LoggingIntegration(level=None, event_level=logging.ERROR),
1106+
]
1107+
)
11001108

11011109
if args.select_output is None:
11021110
return build_docs_with_lock(args, "build_docs.lock")

0 commit comments

Comments
 (0)