跳转到主要内容

OpenCensus Pyramid集成

项目描述

pypi

安装

pip install opencensus-ext-pyramid

使用

在您的应用程序中添加pyramid tween,您的请求将被跟踪。

def main(global_config, **settings):
    config = Configurator(settings=settings)

    config.add_tween('opencensus.ext.pyramid'
                     '.pyramid_middleware.OpenCensusTweenFactory')

可以提供额外的配置,请阅读自定义获取完整参考。

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)

参考文献

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码分发

opencensus-ext-pyramid-0.7.3.tar.gz (4.5 kB 查看哈希值)

上传时间 源代码

构建分发

opencensus_ext_pyramid-0.7.3-py2.py3-none-any.whl (5.7 kB 查看哈希值)

上传时间 Python 2 Python 3

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面