How can I use Sentry to track the output of a Django management command?

I’m trying to use Sentry to track the output of management commands run on a production server. I’m currently using Sentry via the DjangoIntegration in my file:

# Sentry Configuration
    integrations=[DjangoIntegration(), CeleryIntegration()],

I’ve set up a test management command as follows:

from import BaseCommand

class Command(BaseCommand):
    help = 'Raise a simple Exception to test error handlers.'

    def handle(self, *args, **options):
        raise Exception("This is a test.")

Currently the exception does not get sent to Sentry. How can I send an error from a Management command to Sentry?

Python version: 3.7.0
Django version: 2.2.10
Sentry SDK: 0.14.3

Thanks for any support!

I have the same problem, did you find a solution ? thank you in advance