Module: TwitterFriendly::CachingAndLogging::Instrumenter
- Defined in:
- lib/twitter_friendly/caching_and_logging.rb
Class Method Summary collapse
- .complete_processing(method_name, options) ⇒ Object
- .perform_request(method_name, options, &block) ⇒ Object
- .start_processing(method_name, options) ⇒ Object
Class Method Details
.complete_processing(method_name, options) ⇒ Object
47 48 49 50 |
# File 'lib/twitter_friendly/caching_and_logging.rb', line 47 def complete_processing(method_name, ) payload = {operation: method_name}.merge() ::ActiveSupport::Notifications.instrument('complete_processing.twitter_friendly', payload) { yield(payload) } end |
.perform_request(method_name, options, &block) ⇒ Object
52 53 54 55 |
# File 'lib/twitter_friendly/caching_and_logging.rb', line 52 def perform_request(method_name, , &block) payload = {operation: 'request', args: [method_name, ]} ::ActiveSupport::Notifications.instrument('request.twitter_friendly', payload) { yield(payload) } end |
.start_processing(method_name, options) ⇒ Object
42 43 44 45 |
# File 'lib/twitter_friendly/caching_and_logging.rb', line 42 def start_processing(method_name, ) payload = {operation: method_name}.merge() ::ActiveSupport::Notifications.instrument('start_processing.twitter_friendly', payload) {} end |