Class: Stripe::Instrumentation::RequestEndEvent
- Inherits:
 - 
      Object
      
        
- Object
 - Stripe::Instrumentation::RequestEndEvent
 
 
- Defined in:
 - lib/stripe/instrumentation.rb
 
Overview
Event emitted on ‘request_end` callback.
Instance Attribute Summary collapse
- 
  
    
      #duration  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute duration.
 - 
  
    
      #http_status  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute http_status.
 - 
  
    
      #method  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute method.
 - 
  
    
      #num_retries  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute num_retries.
 - 
  
    
      #path  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute path.
 - 
  
    
      #request_body  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute request_body.
 - 
  
    
      #request_header  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute request_header.
 - 
  
    
      #request_id  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute request_id.
 - 
  
    
      #response_body  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute response_body.
 - 
  
    
      #response_header  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute response_header.
 - 
  
    
      #user_data  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Arbitrary user-provided data in the form of a Ruby hash that’s passed from subscribers on ‘request_begin` to subscribers on `request_end`.
 
Instance Method Summary collapse
- 
  
    
      #initialize(request_context:, response_context:, num_retries:, user_data: nil)  ⇒ RequestEndEvent 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of RequestEndEvent.
 
Constructor Details
#initialize(request_context:, response_context:, num_retries:, user_data: nil) ⇒ RequestEndEvent
Returns a new instance of RequestEndEvent.
      38 39 40 41 42 43 44 45 46 47 48 49 50 51 52  | 
    
      # File 'lib/stripe/instrumentation.rb', line 38 def initialize(request_context:, response_context:, num_retries:, user_data: nil) @duration = request_context.duration @http_status = response_context.http_status @method = request_context.method @num_retries = num_retries @path = request_context.path @request_id = request_context.request_id @user_data = user_data @response_header = response_context.header @response_body = response_context.body @request_header = request_context.header @request_body = request_context.body freeze end  | 
  
Instance Attribute Details
#duration ⇒ Object (readonly)
Returns the value of attribute duration.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def duration @duration end  | 
  
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def http_status @http_status end  | 
  
#method ⇒ Object (readonly)
Returns the value of attribute method.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def method @method end  | 
  
#num_retries ⇒ Object (readonly)
Returns the value of attribute num_retries.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def num_retries @num_retries end  | 
  
#path ⇒ Object (readonly)
Returns the value of attribute path.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def path @path end  | 
  
#request_body ⇒ Object (readonly)
Returns the value of attribute request_body.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def request_body @request_body end  | 
  
#request_header ⇒ Object (readonly)
Returns the value of attribute request_header.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def request_header @request_header end  | 
  
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def request_id @request_id end  | 
  
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def response_body @response_body end  | 
  
#response_header ⇒ Object (readonly)
Returns the value of attribute response_header.
      29 30 31  | 
    
      # File 'lib/stripe/instrumentation.rb', line 29 def response_header @response_header end  | 
  
#user_data ⇒ Object (readonly)
Arbitrary user-provided data in the form of a Ruby hash that’s passed from subscribers on ‘request_begin` to subscribers on `request_end`. `request_begin` subscribers can set keys which will then be available in `request_end`.
      36 37 38  | 
    
      # File 'lib/stripe/instrumentation.rb', line 36 def user_data @user_data end  |