From cf8da0c2b1971d0a2161854e6124108c129f3768 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Fri, 7 Aug 2020 17:38:55 -0400 Subject: [PATCH] Insert release for Sentry Change-Id: Ied9b13d48b9edcd4de32ed1e2a505b985652cceb --- images/keystone/keystone-wsgi-public | 9 ++++++++- openstack_operator/operator.py | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/images/keystone/keystone-wsgi-public b/images/keystone/keystone-wsgi-public index 3c049717..b75820f0 100644 --- a/images/keystone/keystone-wsgi-public +++ b/images/keystone/keystone-wsgi-public @@ -14,12 +14,19 @@ # See the License for the specific language governing permissions and # limitations under the License. +import pkg_resources + import sentry_sdk from keystone.server.wsgi import initialize_public_application from sentry_sdk.integrations import wsgi -sentry_sdk.init(traces_sample_rate=0.1) +VERSION = pkg_resources.get_distribution("keystone").version + +sentry_sdk.init( + release="keystone@%s" % VERSION, + traces_sample_rate=0.1 +) application = initialize_public_application() application = wsgi.SentryWsgiMiddleware(application) diff --git a/openstack_operator/operator.py b/openstack_operator/operator.py index 981a361c..8a7f4013 100644 --- a/openstack_operator/operator.py +++ b/openstack_operator/operator.py @@ -20,6 +20,8 @@ the appropriate deployments, an instance of Keystone, Heat and Horizon """ import os +import pkg_resources + import kopf import sentry_sdk from sentry_sdk.integrations import aiohttp @@ -36,8 +38,10 @@ from openstack_operator import utils OPERATOR_CONFIGMAP = "operator-config" +VERSION = pkg_resources.get_distribution("openstack_operator").version sentry_sdk.init( + release="openstack-operator@%s" % VERSION, integrations=[aiohttp.AioHttpIntegration()], traces_sample_rate=1.0 )