Skip to content

Commit 50136ef

Browse files
authored
Add uWSGI examples; command-line & ini file
1 parent a3ea638 commit 50136ef

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,26 @@ This Python instrumentation spawns a lightweight background thread to periodical
5757

5858
If you use uWSGI in forking workers mode, you must specify `--lazy-apps` (or `lazy-apps = true` in ini style) to load the application in the worker instead of the master process.
5959

60+
### uWSGI Example: Command-line
61+
62+
```sh
63+
uwsgi --socket 0.0.0.0:5000 --protocol=http -w wsgi -p 4 --enable-threads --lazy-apps
64+
```
65+
66+
### uWSGI Example: ini file
67+
68+
```ini
69+
[uwsgi]
70+
http = :5000
71+
master = true
72+
processes = 4
73+
enable-threads = true # required
74+
lazy-apps = true # if using "processes", set lazy-apps to true
75+
76+
# Set the Instana sensor environment variable here
77+
env = AUTOWRAPT_BOOTSTRAP=flask
78+
```
79+
6080
## Usage
6181

6282
The instana package will automatically collect key metrics from your Python processes. Just install and go.

0 commit comments

Comments
 (0)