This is similar to dabapps/django-log-request-id#10, with the difference that the django-log-request-id module uses threading.local to store the request id. Flask.g does not work in greenlets (see also: https://stackoverflow.com/questions/47384600/access-flask-g-inside-greenlet).
It would be great if this module could use threading.local instead of flask.g to store the request_id.