Setup Sentry

Christopher Vollick created

I thought the gem did this automatically if I wanted the default config,
but apparently not!

So this requires the SENTRY_DSN env-var to be set, and also in practice
requires SSL_CERT_DIR=/etc/ssl/certs if you don't have the certs
installed in guix as well.

Then we set the worker threads to 0 so it sends synchronously, since
otherwise we're about to quit and it'll just get enqueued and never
flushed.

Change summary

bin/process_interac_email | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

bin/process_interac_email 🔗

@@ -35,6 +35,10 @@ CONFIG =
 	.new(safe: Dhall::Coder::JSON_LIKE + [Symbol, Proc])
 	.load(ARGV.shift, transform_keys: :to_sym)
 
+Sentry.init do |config|
+	config.background_worker_threads = 0
+end
+
 pubsub = BlatherNotify::PubSub::Address.new(**CONFIG[:pubsub])
 
 m = Mail.new(ARGF.read)