Class: Flipper::Cloud::Telemetry::Instrumenter
- Inherits:
-
Object
- Object
- Flipper::Cloud::Telemetry::Instrumenter
- Defined in:
- lib/flipper/cloud/telemetry/instrumenter.rb
Instance Attribute Summary collapse
-
#instrumenter ⇒ Object
readonly
Returns the value of attribute instrumenter.
Instance Method Summary collapse
-
#initialize(cloud_configuration, instrumenter) ⇒ Instrumenter
constructor
A new instance of Instrumenter.
- #instrument(name, payload = {}, &block) ⇒ Object
Constructor Details
#initialize(cloud_configuration, instrumenter) ⇒ Instrumenter
Returns a new instance of Instrumenter.
9 10 11 12 |
# File 'lib/flipper/cloud/telemetry/instrumenter.rb', line 9 def initialize(cloud_configuration, instrumenter) @instrumenter = instrumenter @cloud_configuration = cloud_configuration end |
Instance Attribute Details
#instrumenter ⇒ Object (readonly)
Returns the value of attribute instrumenter.
7 8 9 |
# File 'lib/flipper/cloud/telemetry/instrumenter.rb', line 7 def instrumenter @instrumenter end |
Instance Method Details
#instrument(name, payload = {}, &block) ⇒ Object
14 15 16 17 18 |
# File 'lib/flipper/cloud/telemetry/instrumenter.rb', line 14 def instrument(name, payload = {}, &block) return_value = instrumenter.instrument(name, payload, &block) @cloud_configuration.telemetry.record(name, payload) return_value end |