OpenCensus requests Integration
OpenCensus can trace HTTP requests made with the requests package. The request URL, method, and status will be collected.
You can enable requests integration by specifying 'requests' to trace_integrations.
It’s possible to configure a list of URL you don’t want traced. By default the request to exporter won’t be traced. It’s configurable by giving an array of hostname/port to the attribute excludelist_hostnames in OpenCensus context’s attributes:
Only the hostname must be specified if only the hostname is specified in the URL request.
Installation
pip install opencensus-ext-requests
Usage
import requests
from opencensus.trace import config_integration
from opencensus.trace.tracer import Tracer
if __name__ == '__main__':
config_integration.trace_integrations(['requests'])
tracer = Tracer()
with tracer.span(name='parent'):
response = requests.get(url='https://www.wikipedia.org/wiki/Rabbit')
References
Metadata
Release files for opencensus-ext-requests 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 | Provenance | Actions |
|---|---|---|---|---|
| opencensus-ext-requests-0.8.0.tar.gz | 4.3 kB | Without provenance | Details for opencensus-ext-requests-0.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opencensus_ext_requests-0.8.0-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for opencensus_ext_requests-0.8.0-py2.py3-none-any.whl |
Total release size: 10.4 kB
Release files / opencensus-ext-requests-0.8.0.tar.gz
| Download URL | opencensus-ext-requests-0.8.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a57dd6030ce032e1ed8e7145568058076e400057d0cf44ecd0f5b0f477095a0
|
|
BLAKE2b-256 checksum How to use checksums |
b3359072d30ad34fe845aae31046d33beb660470b059e69b652d893e0e9c947f
|
| 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_requests-0.8.0-py2.py3-none-any.whl
| Download URL | opencensus_ext_requests-0.8.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1ace4b790e2f1950bd91f2c6fa166d69eb65ff0f0671d764d35682a07eed08c0
|
|
BLAKE2b-256 checksum How to use checksums |
a4abd1f9e905fbdd07e00e0e7ec20d7869f43abf4b594adaded8e9a1b2f7fd0d
|
| 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
|
Security for opencensus-ext-requests 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.