0

Recently, I need to add sentry for a tornado project with celery and some crontab functions. But I find I need to add three different sentry settings.

So can we add only one sentry setting for a python project with different frameworks?

And why sentry settings for Python logging can't work with Tornado or Celery?

Cloud
  • 2,859
  • 2
  • 20
  • 23

1 Answers1

1

Sentry is different from logging because it works by capturing the error object at runtime. Logging isn't the recommended way for monitoring crontab functions—rather wrapping the function itself in a try...except.... This lets Sentry not only give you the stack trace (which you get with logging), but also stack locals.

You setup Sentry for Celery and Tornado separately because you need to get both frameworks for pass unhandled exceptions to Sentry. Once again, it's possible to use Python logging, but strongly not recommended.

ehfeng
  • 3,807
  • 4
  • 33
  • 42