logtail / logtail-python

Better Stack Python client
https://betterstack.com/logs
Other
36 stars 10 forks source link

SystemExit exception by flusher reported by monitoring tools #18

Closed Nnonexistent closed 10 months ago

Nnonexistent commented 11 months ago

I have a FastAPI application with both sentry and logtail. Sentry has a ThreadingIntegration, which reports all unhandled exceptions in threads. And logtail finishes flusher thread with sys.exit(0), which is then reported by sentry, which is quite annoying.

If you think it's reasonable to change this logtail behavior to just finish flusher thread silently, I could create a PR for that.

curusarn commented 11 months ago

Hi @Nnonexistent, Thank you for raising this!

I don't see any issue with finishing the flusher without sys.exit(0). You are welcome to submit a PR. Thanks for the initiative!