~singpolyma/jmp-pay

89cc541ca0b2ca3f5cd351698b3cb657d7bd91d5 — Stephen Paul Weber 14 days ago 59cb1bd
Log plan name on exception to sentry
1 files changed, 12 insertions(+), 6 deletions(-)

M config.ru
M config.ru => config.ru +12 -6
@@ 15,13 15,11 @@ end

require_relative "lib/electrum"

if ENV["RACK_ENV"] == "production"
	require "sentry-ruby"
	Sentry.init do |config|
		config.traces_sample_rate = 1
	end
	use Sentry::Rack::CaptureExceptions
require "sentry-ruby"
Sentry.init do |config|
	config.traces_sample_rate = 1
end
use Sentry::Rack::CaptureExceptions

REDIS = Redis.new
PLANS = Dhall.load("env:PLANS").sync


@@ 214,6 212,14 @@ class JmpPay < Roda
			)

			r.on "activate" do
				Sentry.configure_scope do |scope|
					scope.set_transaction_name("activate")
					scope.set_context(
						"activate",
						plan_name: request.params["plan_name"]
					)
				end

				render = lambda do |l={}|
					view(
						"activate",