向哨兵报告奥多错误

odoo11-addon-sentr的Python项目详细描述


License: AGPL-3

哨兵

此模块允许与 奥多。

安装

通过添加 odooaddons_path的模块目录。为了使模块正确 包装odoo wsgi应用程序,它还需要作为服务器范围的加载 模块。这可以使用 或使用--load命令行参数。

此模块还要求ravenpython包在 系统。它可以使用pip安装:

pip install raven

配置

以下附加配置选项可以添加到您的odoo中 配置文件:

OptionDescriptionDefault
^{tt3}$Sentry Data Source Name. You can find this value in your Sentry project configuration. Typically it looks something like this: https://<public_key>:<secret_key>@sentry.example.com/<project id> This is the only required option in order to use the module.^{tt4}$
^{tt5}$Whether or not Sentry logging is enabled.^{tt6}$
^{tt7}$The minimal logging level for which to send reports to Sentry. Possible values: notset, debug, info, warn, error, critical. It is recommended to have this set to at least warn, to avoid spamming yourself with Sentry events.^{tt8}$
^{tt9}$A string of comma-separated logger names which should be excluded from Sentry.^{tt10}$
^{tt11}$A string of comma-separated exceptions which should be ignored. You can use a star symbol (*) at the end, to ignore all exceptions from a module, eg.: odoo.exceptions.*.^{tt12}$
^{tt13}$A string of comma-separated processor classes which will be applied on an event before sending it to Sentry.^{tt14}$
^{tt15}$Transport class which will be used to send events to Sentry. Possible values: threaded: spawns an async worker for processing messages, synchronous: a synchronous blocking transport; requests_threaded: an asynchronous transport using the requests library; requests_synchronous - blocking transport using the requests library.^{tt16}$
^{tt17}$If enabled, additional context data will be extracted from current HTTP request and user session (if available). This has no effect for Cron jobs, as no request/session is available inside a Cron job.^{tt18}$
^{tt19}$Explicitly define a version to be sent as the release version to Sentry. Useful in conjuntion with Sentry’s “Resolve in the next release”-functionality. Also useful if your production deployment does not include any Git context from which a commit might be read. Overrides sentry_odoo_dir.
^{tt20}$Absolute path to your Odoo installation directory. This is optional and will only be used to extract the Odoo Git commit, which will be sent to Sentry, to allow to distinguish between Odoo updates. Overridden by sentry_release

其他client arguments可以是 通过在odoo配置中在参数名前面加上sentry\u来配置 文件。当前支持的其他客户端参数是:install_sys_hook, include_paths, exclude_paths, machine, auto_log_stacks, capture_locals, string_max_length, list_max_length, site, include_versions, environment

ODOO配置示例

下面是带有odoo sentry选项的odoo配置文件的示例:

[options]
sentry_dsn = https://<public_key>:<secret_key>@sentry.example.com/<project id>
sentry_enabled = true
sentry_logging_level = warn
sentry_exclude_loggers = werkzeug
sentry_ignore_exceptions = odoo.exceptions.AccessDenied,odoo.exceptions.AccessError,odoo.exceptions.MissingError,odoo.exceptions.RedirectWarning,odoo.exceptions.UserError,odoo.exceptions.ValidationError,odoo.exceptions.Warning,odoo.exceptions.except_orm
sentry_processors = raven.processors.SanitizePasswordsProcessor,odoo.addons.sentry.logutils.SanitizeOdooCookiesProcessor
sentry_transport = threaded
sentry_include_context = true
sentry_environment = production
sentry_auto_log_stacks = false
sentry_odoo_dir = /home/odoo/odoo/
sentry_release = 1.3.2

使用量

一旦配置并安装,模块将在和报告任何日志事件。 在配置的岗哨日志级别之上,不需要其他操作。

Try me on Runbot

已知问题/路线图

  • 没有数据库分离–此模块通过截取所有odoo来工作 记录正在运行的odoo进程中的记录。这意味着一旦安装在 一个数据库,它将拦截并报告所有ODOO数据库的错误, 在奥多服务器上使用的。
  • frontend integration–在将来,添加 通过集成 raven-js。另外,Sentry user feedback form可以是 集成到odoo客户机错误对话框窗口中,允许用户很快 描述当事情出错时他们在做什么。

缺陷跟踪器

GitHub Issues上跟踪错误。如果有麻烦,请 如果您的问题已经报告,请检查那里。如果你先发现它, 通过提供详细且受欢迎的反馈,帮助我们粉碎它。

学分

贡献者

维护人员

Odoo Community Association

此模块由OCA维护。

oca,或odoo社区协会,是一个非营利性组织 任务是支持odoo特性和 促进其广泛应用。

若要对此模块作出贡献,请访问https://odoo-community.org

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

推荐PyPI第三方库


热门话题
java区块链表示   如何识别此Java框架中使用的加密技术?   java从outter jar加载一个包含所有组件的类   java如何在netty中序列化和反序列化HttpMessage或HttpContent?   java Hibernate在一定量的插入后生成负id   文件在FTP服务器上复制,而不是在java中移动   java如何在Android应用程序中使用静态对话框片段方法?   java扫描器while循环   java如何比较drools中数组列表的泛型元素?   java构建Restful服务失败CDI部署失败   java我的播放机将子弹射出90度   在Android设备中使用WiFi direct进行java数据传输   java在命令设计模式中将上下文传递给execute方法   java KeyClope TomcatAdapter:是否有“KeyClope”的替代路径。json'?   java如何将数据库中的名称放入我在另一个类中创建的JLIst中?   java Spring Mvc和MediaType for在获取rest请求的@RequestMapping中使用   java如何在应用程序运行时从包中打开文本文件?   java以Spring形式为单个对象定义POJO id   java清除gridview中的所有选定项