Class: Stripe::Instrumentation::RequestBeginEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/stripe/instrumentation.rb

Overview

Event emitted on ‘request_begin` callback.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method:, path:, user_data:) ⇒ RequestBeginEvent

Returns a new instance of RequestBeginEvent.



19
20
21
22
23
24
# File 'lib/stripe/instrumentation.rb', line 19

def initialize(method:, path:, user_data:)
  @method = method
  @path = path
  @user_data = user_data
  freeze
end

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



7
8
9
# File 'lib/stripe/instrumentation.rb', line 7

def method
  @method
end

#pathObject (readonly)

Returns the value of attribute path.



7
8
9
# File 'lib/stripe/instrumentation.rb', line 7

def path
  @path
end

#user_dataObject (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`.

Note that all subscribers of ‘request_begin` share the same object, so they must be careful to set unique keys so as to not conflict with data set by other subscribers.



17
18
19
# File 'lib/stripe/instrumentation.rb', line 17

def user_data
  @user_data
end