OpenCensus Pyramid Integration
Project description
Installation
pip install opencensus-ext-pyramid
Usage
In your application, add the pyramid tween and your requests will be traced.
def main(global_config, **settings):
config = Configurator(settings=settings)
config.add_tween('opencensus.ext.pyramid'
'.pyramid_middleware.OpenCensusTweenFactory')
Additional configuration can be provided, please read Customization for a complete reference.
from opencensus.trace import print_exporter
from opencensus.trace import samplers
settings = {
'OPENCENSUS': {
'TRACE': {
'EXPORTER': print_exporter.PrintExporter(),
'SAMPLER': samplers.ProbabilitySampler(rate=0.5),
}
}
}
config = Configurator(settings=settings)
References
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for opencensus-ext-pyramid-0.7.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fb5c40aa0ffffba986a3b18552af1479ee401a630b88d430d72fd7b571bc9e5 |
|
MD5 | b0471c0af0381c97b2cc676038be5a65 |
|
BLAKE2b-256 | af8099756ae58b53eecd44f0e041157c5cc6ebd4733ace4efbaa7250dd190360 |
Close
Hashes for opencensus_ext_pyramid-0.7.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7b031621e72855b83d1e67c65a1bae8e6e4101dd727c72533e506a9e5e9fd4b |
|
MD5 | d61d6564cee1f1499f7154b44a6c5a15 |
|
BLAKE2b-256 | e0711ecd9fda60bf92aab859fea6f09303aaf386de230616c7e9678f2c541b42 |