Skip to content

Commit

Permalink
Merge pull request #184 from animuk/master
Browse files Browse the repository at this point in the history
Sentry integration into gemini server
  • Loading branch information
Anindya Mukherjee authored May 17, 2019
2 parents 9c52309 + ba7add7 commit 47d5f76
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
11 changes: 4 additions & 7 deletions openshift/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ objects:
- name: WORKER_ADMINISTRATION_REGION
value: "api"
- name: SENTRY_DSN
value: "${SENTRY_DSN}"
valueFrom:
secretKeyRef:
name: worker
key: sentry_dsn
- name: BAYESIAN_FETCH_PUBLIC_KEY
valueFrom:
configMapKeyRef:
Expand Down Expand Up @@ -232,12 +235,6 @@ parameters:
name: GEMINI_API_SERVICE_PORT
value: "5000"

- description: Sentry DSN
displayName: Sentry DSN
required: false
name: SENTRY_DSN
value: ""

- description: "Flask logging level (see: https://docs.python.org/3/library/logging.html#levels)"
displayName: Flask logging level
required: false
Expand Down
1 change: 1 addition & 0 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ pytest-mock
codecov
radon
boto3
sentry-sdk
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ six==1.11.0 # via flask-cors, mando, more-itertools, pytest, pytho
sqlalchemy==1.2.12
urllib3==1.23 # via botocore, requests
werkzeug==0.14.1 # via flask
sentry-sdk==0.7.2
4 changes: 4 additions & 0 deletions src/rest_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Definition of the routes for gemini server."""
import os
import flask
import requests
from flask import Flask, request
Expand All @@ -13,11 +14,14 @@
from repo_dependency_creator import RepoDependencyCreator
from notification.user_notification import UserNotification
from fabric8a_auth.errors import AuthError
import sentry_sdk


app = Flask(__name__)
CORS(app)

sentry_sdk.init(os.environ.get("SENTRY_DSN"))

init_selinon()

SERVICE_TOKEN = 'token'
Expand Down

0 comments on commit 47d5f76

Please sign in to comment.