Browse Source

Added support for Sentry

Change-Id: I410e54e2f729d1bb9fdc056ea2527b8c7d73b631
changes/48/745248/4
Mohammed Naser 8 months ago
parent
commit
a3c3252b8f
3 changed files with 12 additions and 0 deletions
  1. +4
    -0
      chart/templates/deployment.yaml
  2. +7
    -0
      openstack_operator/operator.py
  3. +1
    -0
      requirements.txt

+ 4
- 0
chart/templates/deployment.yaml View File

@ -22,6 +22,10 @@ spec:
image: vexxhost/openstack-operator:latest
command: ["/usr/local/bin/kopf"]
env:
{{- with .Values.sentryDSN }}
- name: SENTRY_DSN
value: {{ .Values.sentryDSN }}
{{- end }}
- name: OPERATOR_NAMESPACE
valueFrom:
fieldRef:


+ 7
- 0
openstack_operator/operator.py View File

@ -21,6 +21,8 @@ the appropriate deployments, an instance of Keystone, Heat and Horizon
import os
import kopf
import sentry_sdk
from sentry_sdk.integrations import aiohttp
from openstack_operator import ceilometer
from openstack_operator import chronyd
@ -35,6 +37,11 @@ from openstack_operator import utils
OPERATOR_CONFIGMAP = "operator-config"
sentry_sdk.init(
integrations=[aiohttp.AioHttpIntegration()],
traces_sample_rate=1.0
)
def operator_configmap(namespace, name, **_):
"""Filter on the operator's ConfigMap."""


+ 1
- 0
requirements.txt View File

@ -1,3 +1,4 @@
kopf==0.27rc6
Jinja2
sentry-sdk==0.16.3
openstacksdk

Loading…
Cancel
Save