[MIG] sentry: Migration to 16.0

pull/2516/head
prabakaran 2023-01-03 13:54:24 +05:30
parent dea7acffe6
commit b0503be885
3 changed files with 3 additions and 4 deletions

View File

@ -3,7 +3,7 @@
{
"name": "Sentry",
"summary": "Report Odoo errors to Sentry",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Extra Tools",
"website": "https://github.com/OCA/server-tools",
"author": "Mohammed Barsi,"

View File

@ -6,7 +6,6 @@ import warnings
from collections import abc
import odoo.http
from odoo.service import wsgi_server
from odoo.service.server import server
from odoo.tools import config as odoo_config
@ -123,7 +122,7 @@ def initialize_sentry(config):
server.app = SentryWsgiMiddleware(server.app)
# Patch the wsgi server in case of further registration
wsgi_server.application = SentryWsgiMiddleware(wsgi_server.application)
odoo.http.Application = SentryWsgiMiddleware(odoo.http.Application)
with sentry_sdk.push_scope() as scope:
scope.set_extra("debug", False)

View File

@ -3,8 +3,8 @@
import logging
import sys
from unittest.mock import patch
from mock import patch
from sentry_sdk.integrations.logging import _IGNORED_LOGGERS
from sentry_sdk.transport import HttpTransport