python的作用域代理

scopeagent的Python项目详细描述


python代理

python代理Scope

安装

pip install scopeagent

用法

首先,从作用域安装中获取api密钥。

然后,在启动命令前面加上scope-run

scope-run python run my_app.py
scope-run gunicorn myapp.wsgi
scope-run python -m unittest discover

参数

FlagRequired?DefaultDescriptionEnvironment variable
^{}, ^{}YAPI key tog use when sending data to Scope^{}
^{}, ^{}YAPI endpoint of the Scope installation to send data to^{}
^{}, ^{}N^{}Service name to use when sending data to Scope^{}
^{}, ^{}N^{}Commit hash to use when sending data to Scope^{}
^{}, ^{}N^{}Repository URL to use when sending data to Scope^{}
^{}N^{}Repository root path^{}

如果通过环境变量在Circleci或Jenkins上运行,则将自动检测提交、存储库和源根信息。

高级使用

如果上述设置不适用于您的特定设置, 您还可以通过尽早运行以下命令来安装范围代理 在您的代码中(因为它需要修补支持的库):

importscopeagentagent=scopeagent.Agent(api_key="xxxxxxxx",api_endpoint="https://scope.mycompany.corp")agent.install()

支持的库

NameSpan/event creationExtractInject
^{}*
^{}**
^{}**
^{}*
^{}*
^{}***
^{}*

开发

自动测试

以下环境变量用于数据库测试:

  • POSTGRES_DBURL

致谢

有些代码是从uber的opentracing-python-instrumentation (mit许可证)中复制出来的,或者是受其启发的。原始版权声明保存在复制的文件中。

许可证

版权所有©2019 Undefined Labs,Inc.保留所有权利。

该软件包括在开源许可下发布的第三方组件。查看NOTICE.md了解详细信息。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
HTTP标头的java InputStream未终止   java测试SpringWebListener   具有定义的替换编号Java的regex ReplaceAll   在java中使用contains()方法   java在选择查询中使用JoinColumn字段   具有用户的java Start-stop demon不是以给定用户启动   java glBufferData生成GL\u无效\u操作   java中循环代码的循环   Java位无符号移位(>>>>)会产生奇怪的结果   java HQL使用点分隔符从select获取结果   条纹、弹簧、玩耍(或?):使用哪种高性能Java框架?   广播接收机中的java停止服务   java回收器视图占据整个屏幕。不在上面显示我的UI元素   java使MySQL查询更快   java MappedByteBuffer查询   java递归算法问题