OpenCensus Django Integration
Installation
pip install opencensus-ext-django
Usage
For tracing Django requests, you will need to add the following line to the MIDDLEWARE section in the Django settings.py file.
MIDDLEWARE = [
...
'opencensus.ext.django.middleware.OpencensusMiddleware',
]
Additional configuration can be provided, please read Customization for a complete reference.
OPENCENSUS = {
'TRACE': {
'SAMPLER': 'opencensus.trace.samplers.ProbabilitySampler(rate=1)',
'EXPORTER': '''opencensus.ext.ocagent.trace_exporter.TraceExporter(
service_name='foobar',
)''',
}
}
References
Release files for opencensus-ext-django 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| opencensus-ext-django-0.8.0.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opencensus_ext_django-0.8.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / opencensus-ext-django-0.8.0.tar.gz
| Download URL | opencensus-ext-django-0.8.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e02d55aeafbf6048b68cdc1e07fdeed62fbf7c6775a746493c816af4ce67468a
|
|
BLAKE2b-256 checksum How to use checksums |
e779dd3b9f27cbc9734a30d41d2b1a57309c37871c7d43aec9a313e3764b61c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.9
|
Release files / opencensus_ext_django-0.8.0-py2.py3-none-any.whl
| Download URL | opencensus_ext_django-0.8.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
276fab11b99abbaa3eafae7a91aa7a084a71716c769c7bc8d932030bb9302769
|
|
BLAKE2b-256 checksum How to use checksums |
ad6d2253fe3d9c4284aee2a178e3feba40e09b37c4158fe686883b1954dddac9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.7.9
|