Skip to content

Commit

Permalink
Merge pull request #3132 from hypothesis/client-sentry-dsn
Browse files Browse the repository at this point in the history
Use specific Sentry DSN for the client part of H
  • Loading branch information
robertknight committed Mar 24, 2016
2 parents 24977f6 + 1467bbe commit d8a8627
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions h/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
EnvSetting('h.db.should_create_all', 'MODEL_CREATE_ALL', type=asbool),
EnvSetting('h.db.should_drop_all', 'MODEL_DROP_ALL', type=asbool),
EnvSetting('h.websocket_url', 'H_WEBSOCKET_URL'),
# The client Sentry DSN should be of the public kind, lacking the password
# component in the DSN URI.
EnvSetting('h.client.sentry_dsn', 'SENTRY_DSN_CLIENT'),

# Debug/development settings
EnvSetting('debug_query', 'DEBUG_QUERY'),
Expand Down
3 changes: 2 additions & 1 deletion h/views/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

def render_app(request, extra=None):
"""Render a page that serves a preconfigured annotation client."""
client_sentry_dsn = request.registry.settings.get('h.client.sentry_dsn')
html = client.render_app_html(
assets_env=request.assets_env,
# FIXME: The '' here is to ensure this has a trailing slash. This seems
Expand All @@ -29,7 +30,7 @@ def render_app(request, extra=None):
api_url=request.route_url('api.index'),
service_url=request.route_url('index'),
ga_tracking_id=request.registry.settings.get('ga_tracking_id'),
sentry_public_dsn=request.sentry.get_public_dsn(),
sentry_public_dsn=client_sentry_dsn,
websocket_url=request.registry.settings.get('h.websocket_url'),
extra=extra)
request.response.text = html
Expand Down

0 comments on commit d8a8627

Please sign in to comment.