Page MenuHomeSoftware Heritage

Add gunicorn config script to initialize sentry-sdk based on envvars.

Authored by vlorentz on Dec 9 2019, 4:28 PM.

Diff Detail

rDCORE Foundations and core functionalities
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz created this revision.Dec 9 2019, 4:28 PM

I don't know how to fix the tests. It's failing in the non-http envs, because I only install sentry-sdk (with the flask extra) for http.

vlorentz updated this revision to Diff 8552.Dec 9 2019, 6:27 PM

fix deps

olasd accepted this revision.Dec 10 2019, 12:03 PM
olasd added a subscriber: olasd.

Looks like phabricator messed up the stacking here. See comments on the other diff.

Before merging, could you add a rationale for using the post_fork hook as a comment or docstring here? I guess the point is to do the sentry sdk init as early as possible in every worker, but making that explicit would surely help the next person understand that.

This revision is now accepted and ready to land.Dec 10 2019, 12:03 PM
vlorentz updated this revision to Diff 8563.Dec 10 2019, 1:52 PM

add rational for using post_fork

This revision was landed with ongoing or failed builds.Dec 10 2019, 1:53 PM
This revision was automatically updated to reflect the committed changes.
Harbormaster failed remote builds in B9642: Diff 8563!