Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

Commit

Permalink
Remove all references to raven in config files
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricmessiant committed Nov 8, 2018
1 parent c127dce commit 8633cba
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 43 deletions.
15 changes: 1 addition & 14 deletions assembl/configs/no_sentry.ini
@@ -1,8 +1,5 @@
[pipeline:main]
pipeline = assembl

[app:assembl]
raven_url =
sentry_dsn =

[logger_root]
handlers = file
Expand All @@ -15,13 +12,3 @@ handlers = file

[logger_alembic]
handlers = file

[logger_sentry]
handlers = file


[handler_sentry]
args = ()

[filter:raven]
dsn =
15 changes: 1 addition & 14 deletions assembl/configs/production.ini
@@ -1,6 +1,5 @@
[pipeline:main]
pipeline =
raven
assembl

[app:assembl]
Expand All @@ -20,7 +19,7 @@ handle_exceptions =
assembl_handle_exceptions = true

# Ensure to have the same url scheme as Assembl and Sentry's (http or https)
raven_url = %(sentry_scheme)s://%(sentry_key)s@%(sentry_host)s/%(sentry_id)s
sentry_dsn = %(sentry_scheme)s://%(sentry_key)s@%(sentry_host)s/%(sentry_id)s

tm.attempts=3

Expand Down Expand Up @@ -472,12 +471,6 @@ args = (sys.stderr,)
level = NOTSET
formatter = colored

[handler_sentry]
class = raven.handlers.logging.SentryHandler
args = ('threaded+requests+%(sentry_scheme)s://%(sentry_key)s:%(sentry_secret)s@%(sentry_host)s/%(sentry_id)s',)
level = WARNING
formatter = generic

[handler_file]
level = INFO
args = ('var/log/assembl.log', 'a', 200000, 10, 'utf-8')
Expand All @@ -500,12 +493,6 @@ class = assembl.lib.logging.ConsoleFormatter

# End logging configuration

[filter:raven]
use = egg:raven#raven
dsn = threaded+requests+%(sentry_scheme)s://%(sentry_key)s:%(sentry_secret)s@%(sentry_host)s/%(sentry_id)s
include_paths = assembl
exclude_paths =

[supervisor]

autostart_celery = true
Expand Down
4 changes: 1 addition & 3 deletions assembl/configs/testing.rc
Expand Up @@ -52,9 +52,7 @@ supervisor__autostart_uwsgi = false
supervisor__autostart_urlmetadata = false
uwsgi__processes = 4
web_analytics_piwik_script =
filter:raven__dsn =
raven_url =
handler_sentry__args =
sentry_dsn =
saml_country = FR
saml_state = Hauts-de-Seine
saml_locality = Levallois-Perret
Expand Down
4 changes: 2 additions & 2 deletions assembl/static/js/app/index.js
Expand Up @@ -16,9 +16,9 @@ var App = require('./app.js'),
* */
Ctx.initMomentJsLocale();

if (raven_url.length) {
if (sentry_dsn.length) {
Raven.config(
raven_url,
sentry_dsn,
{
ignoreErrors: ['AttributeError: \'ZMQRouter\' object has no attribute \'loop\''] //Squelch error untill https://github.com/mrjoes/sockjs-tornado/pull/67 goes through
}
Expand Down
2 changes: 1 addition & 1 deletion assembl/static/js/app/utils/scrollUtils.js
Expand Up @@ -158,7 +158,7 @@ var scrollToElement = function(el, callback, margin, animate, watch) {
}
}
catch (e) {
if (raven_url) {
if (sentry_dsn) {
Raven.captureException(e);
} else {
throw e;
Expand Down
6 changes: 3 additions & 3 deletions assembl/static/js/app/views/baseMessageList.js
Expand Up @@ -731,12 +731,12 @@ return cls.extend({
return true;
});
}).catch(function(e) {
if (raven_url) {
if (sentry_dsn) {
Raven.captureException(e);
}
that.ui.messageFamilyList.add("<div class='error'>We are sorry, a technical error occured during rendering.</div>");
//For debugging, uncomment the following to get stack traces add true || at the begining of the if
if (that.debugPaging || Ctx.debugRender || !raven_url) {
if (that.debugPaging || Ctx.debugRender || !sentry_dsn) {
throw e;
}

Expand Down Expand Up @@ -1818,7 +1818,7 @@ return cls.extend({
throw new Error("resultMessageIdCollection is missing");
}
} catch (e) {
if (raven_url) {
if (sentry_dsn) {
Raven.captureException(e,
{ messageId: messageId,
visitorViewData: visitorData.visitorViewData
Expand Down
2 changes: 1 addition & 1 deletion assembl/static/js/app/views/messageListPostQuery.js
Expand Up @@ -414,7 +414,7 @@ var PostQuery = function() {
collection.url = url;
collection.collectionManager = new CollectionManager();
return Promise.resolve(collection.fetch()).thenReturn(collection).catch(function(e) {
if (raven_url) {
if (sentry_dsn) {
Raven.captureException(e);
} else {
throw e;
Expand Down
2 changes: 1 addition & 1 deletion assembl/templates/includes/javascript.jinja2
Expand Up @@ -5,7 +5,7 @@
var urlArgs = null;
{% endif %}
var assembl_locale = '{{locale}}';
var raven_url = '{{raven_url}}';
var sentry_dsn = '{{sentry_dsn}}';
var activate_tour = {{activate_tour}};
var first_login_after_auto_subscribe_to_notifications = {% if first_login_after_auto_subscribe_to_notifications == true %}true{% else %}false{% endif %};
</script>
Expand Down
2 changes: 1 addition & 1 deletion assembl/views/__init__.py
Expand Up @@ -360,7 +360,7 @@ def process_export_list(ls):
REACT_URL=react_url,
elasticsearch_lang_indexes=config.get('elasticsearch_lang_indexes', 'en fr'),
first_login_after_auto_subscribe_to_notifications=first_login_after_auto_subscribe_to_notifications,
raven_url=config.get('raven_url') or '',
sentry_dsn=config.get('sentry_dsn', ''),
activate_tour=str(config.get('activate_tour') or False).lower(),
providers=providers,
providers_json=json.dumps(providers),
Expand Down
4 changes: 1 addition & 3 deletions docker/assembl_subprocess.rc.jinja2
Expand Up @@ -24,9 +24,7 @@ sentry_api_token = {{ sentry_api_token }}
{% elif docker_sentry %}
*sentry_host = {{ docker_sentry }}
{% else %}
raven_url =
handler_sentry__args = ()
filter:raven__dsn =
sentry_dsn =
{% endif %}

{% if docker_piwik == 'docker' %}
Expand Down

0 comments on commit 8633cba

Please sign in to comment.