Skip to content

Commit

Permalink
Pass Git SHA and environment name to Sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
gentlecat committed Jun 30, 2017
1 parent cd369f0 commit 3b41f22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion consul_config.py.ctmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

{{- define "KEY" -}}
{{ key (printf "docker-server-configs/CB/config.%s.json/%s" (env "DEPLOY_ENV") .) }}
{{- end -}}
Expand All @@ -10,7 +12,10 @@
SECRET_KEY = '''{{template "KEY" "secret_key"}}'''

LOG_SENTRY = {
'dsn': '''{{template "KEY" "sentry_dsn_private"}}''',
'dsn': '''{{template "KEY" "sentry/dsn_private"}}''',
'environment': '''{{template "KEY" "sentry/environment"}}''',
'release': os.getenv('GIT_SHA', None)
,
}
SENTRY_DSN_PUBLIC = '''{{template "KEY" "sentry_dsn_public"}}'''

Expand Down
7 changes: 5 additions & 2 deletions docker/config/CB/config.prod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"secret_key": "CHANGE ME PLEASE",
"sentry_dsn_private": "",
"sentry_dsn_public": "",
"sentry": {
"dsn_private": "",
"dsn_public": "",
"environment": "development"
},
"admins": "[\"example1\", \"example2\"]",
"musicbrainz": {
"hostname": "musicbrainz.org",
Expand Down

0 comments on commit 3b41f22

Please sign in to comment.