Insert release for Sentry

Change-Id: Ied9b13d48b9edcd4de32ed1e2a505b985652cceb
This commit is contained in:
Mohammed Naser 2020-08-07 17:38:55 -04:00
parent 881ff5fdbc
commit cf8da0c2b1
2 changed files with 12 additions and 1 deletions

View File

@ -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)

View File

@ -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
)