Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
+class SomeController < ApplicationController
+
+ def do_something
+ Thread.current[:counter] = Thread.current[:counter].to_i + 1
+ if Thread.current[:counter] % 2 == 0
+ Airbrake.merge_context(some_key: 'bla bla')
+ else
+ raise StandardError, 'bla bla'
+ end
+
+ render json: 'lol'
+ end
+end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment