Class: Stripe::Instrumentation::RequestEndEvent

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

Overview

Event emitted on ‘request_end` callback.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(duration:, http_status:, method:, num_retries:, path:, request_id:, user_data: nil) ⇒ RequestEndEvent



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/stripe/instrumentation.rb', line 43

def initialize(duration:, http_status:, method:, num_retries:, path:,
               request_id:, user_data: nil)
  @duration = duration
  @http_status = http_status
  @method = method
  @num_retries = num_retries
  @path = path
  @request_id = request_id
  @user_data = user_data
  freeze
end

Instance Attribute Details

#durationObject (readonly)

Returns the value of attribute duration.



30
31
32
# File 'lib/stripe/instrumentation.rb', line 30

def duration
  @duration
end

#http_statusObject (readonly)

Returns the value of attribute http_status.



31
32
33
# File 'lib/stripe/instrumentation.rb', line 31

def http_status
  @http_status
end

#methodObject (readonly)

Returns the value of attribute method.



32
33
34
# File 'lib/stripe/instrumentation.rb', line 32

def method
  @method
end

#num_retriesObject (readonly)

Returns the value of attribute num_retries.



33
34
35
# File 'lib/stripe/instrumentation.rb', line 33

def num_retries
  @num_retries
end

#pathObject (readonly)

Returns the value of attribute path.



34
35
36
# File 'lib/stripe/instrumentation.rb', line 34

def path
  @path
end

#request_idObject (readonly)

Returns the value of attribute request_id.



35
36
37
# File 'lib/stripe/instrumentation.rb', line 35

def request_id
  @request_id
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`.



41
42
43
# File 'lib/stripe/instrumentation.rb', line 41

def user_data
  @user_data
end