Skip to content

Instantly share code, notes, and snippets.

@pradishb
Last active March 17, 2023 08:41
Show Gist options
  • Save pradishb/c000ff52f5b6c894e5394772735513ac to your computer and use it in GitHub Desktop.
Save pradishb/c000ff52f5b6c894e5394772735513ac to your computer and use it in GitHub Desktop.
Python sentry config with LoggingIntegration CRITICAL
import sentry_sdk
from sentry_sdk.integrations.logging import LoggingIntegration
sentry_logging = LoggingIntegration(event_level=logging.CRITICAL)
sentry_sdk.init(
dsn=SENTRY_DSN,
traces_sample_rate=1.0, integrations=[sentry_logging],
ignore_errors=[KeyboardInterrupt],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment