Skip to content

Commit efa6a17

Browse files
authored
Add Django note for BETA
1 parent a5621d3 commit efa6a17

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,27 @@ The instana package is [hosted on pypi](https://pypi.python.org/pypi/instana) an
2222

2323
## Usage
2424

25-
The instana package is a zero configuration tool that will automatically collect key metrics from your Python processes. Just install and go.
25+
The instana package will automatically collect key metrics from your Python processes. Just install and go.
26+
27+
## Django Middleware
28+
29+
For the initial BETA, Django instrumentation must be manually inserted into the Django middleware list. This will be automated before post BETA release.
30+
31+
in `myapp/settings.py`:
32+
```python
33+
import instana.middleware
34+
35+
MIDDLEWARE = [
36+
'instana.middleware.InstanaMiddleware', # Add Instana at the start of the list
37+
'django.middleware.security.SecurityMiddleware',
38+
'django.contrib.sessions.middleware.SessionMiddleware',
39+
'django.middleware.common.CommonMiddleware',
40+
'django.middleware.csrf.CsrfViewMiddleware',
41+
'django.contrib.auth.middleware.AuthenticationMiddleware',
42+
'django.contrib.messages.middleware.MessageMiddleware',
43+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
44+
]
45+
```
2646

2747
## Tracing
2848

0 commit comments

Comments
 (0)