osclib/sentry: tag osc version.

This commit is contained in:
Jimmy Berry 2019-08-29 14:10:29 -05:00
parent eb0a6c4659
commit d10a359c0c

View File

@ -1,4 +1,5 @@
from osc import conf
from osc import core
from osclib.common import VERSION
def sentry_init(obs_apiurl=None, tags=None):
@ -14,6 +15,8 @@ def sentry_init(obs_apiurl=None, tags=None):
release=VERSION)
with sentry_sdk.configure_scope() as scope:
scope.set_tag('osc', core.__version__)
if obs_apiurl:
scope.set_tag('obs_apiurl', obs_apiurl)
scope.user = {'username': conf.get_apiurl_usr(obs_apiurl)}