Skip to content

Instantly share code, notes, and snippets.

@kalys
Created November 26, 2018 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalys/0ecd7299959ab11bd5b039497fff9677 to your computer and use it in GitHub Desktop.
Save kalys/0ecd7299959ab11bd5b039497fff9677 to your computer and use it in GitHub Desktop.
+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