def get_request_id(my_request):
    try:
        request_id = my_request.headers['X-Request-Id']
    except KeyError:
        request_id = str(uuid.uuid4())

    g.request_id = request_id

    return request_id