Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In order to capture code coverage on your backend server, you need to run it using our Python test listener agent

uWSGI

When working with uWSGI you need to run uWSGI with the following flags either in the command line or in the uwsgi configuration file: --enable-threads  --single-interpreter --lazy-apps --import python_agent.init

...

Code Block
firstline1
titleSample uWSGI config file
[uwsgi]
...
enable-threads = true
single-interpreter = true
lazy-apps = true
import = python_agent.init

Gunicorn WSGI

When working with Gunicorn WSGI you need to run it with the following a configuration file which contains an import of the SeaLights Python agent in the post_fork section

Code Block
firstline1
titleSample Gunicorn config file
...
def post_fork(server, worker):
    import python_agent.init
...

Other servers

For other servers, run the with the SeaLights Python agent and the run flag

...