def app(environ, start_response): data = "Hello, World!\n" start_response("200 OK", [ ("Content-Type", "text/plain"), ("Content-Length", str(len(data))) ]) return iter([data])
$ pip install newrelic gunicorn $ newrelic-admin generate-config < > $ NEW_RELIC_CONFIG_FILE=newrelic.ini newrelic-admin run-program gunicorn myapp:app
Source: https://habr.com/ru/post/194162/
All Articles