向哨兵报告奥多错误

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如何在jprogressbar上添加文本?   java生成30到32位之间的随机数   我想从我自己的服务器而不是java worldwind中的nasa服务器获取数据   jsp中带有外部java文件的html计数器   java如何找到运行Servlet的主机和端口   我怎么能看到数学。java中的cos方法计算平方根?   java这个docker run命令做什么?   java如何在将表单提交到servlet后将原始JSP保存在URL中?   如何在Java中访问Arraylist中的字典数据?   java JPA如果我有一个实体被用作复合键,那么级联是否也构成复合键的一部分?   连接Java:文件读取/添加到文件程序时未按预期工作(逻辑错误)   java从Android向PLC发送布尔值   java Get build。gradle文件作为一个。类文件   Youtube API V3 Java无需调用浏览器即可上传视频   java如何在Unittest中测试StackOverflower错误   实现方法中的java异常处理   java这个::instanceMethod在java8中用作方法参数有什么用途   java偶尔会获得javax。邮政使用javamail阅读gmail电子邮件时的FolderClosedException