Skip to main content

OpenCensus Requests Integration

Project description


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 blacklist_hostnames in OpenCensus context’s attributes:

Only the hostname must be specified if only the hostname is specified in the URL request.


pip install opencensus-ext-requests


import requests
from opencensus.trace import config_integration
from opencensus.trace.tracer import Tracer

if __name__ == '__main__':
    tracer = Tracer()
    with tracer.span(name='parent'):
        response = requests.get(url='')


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for opencensus-ext-requests, version 0.7.1
Filename, size & hash File type Python version Upload date
opencensus_ext_requests-0.7.1-py2.py3-none-any.whl (5.0 kB) View hashes Wheel py2.py3
opencensus-ext-requests-0.7.1.tar.gz (3.8 kB) View hashes Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page