Module: PaperTrailDiff::Instrumentation
- Defined in:
- lib/paper_trail_diff/instrumentation.rb,
sig/generated/paper_trail_diff/instrumentation.rbs
Overview
Emits quiet, namespaced runtime events for application-owned diagnostics.
Class Method Summary collapse
- .comparison_payload(association_paths:, reload_live_endpoints:) ⇒ Object
- .instrument(event, payload) ⇒ Object
-
.notify(event, payload) ⇒ Object
Reports a condition rather than timing work: nothing failed, but the result may be incomplete and only the application can judge that.
Instance Method Summary collapse
-
#self?.comparison_payload ⇒ Hash[Symbol, untyped]
: (association_paths: Array, reload_live_endpoints: bool) -> Hash[Symbol, untyped].
-
#self?.instrument { ... } ⇒ Object
: (String | Symbol, Hash[Symbol, untyped]) { () -> untyped } -> untyped.
-
#self?.notify ⇒ void
Reports a condition rather than timing work: nothing failed, but the result may be incomplete and only the application can judge that.
Class Method Details
.comparison_payload(association_paths:, reload_live_endpoints:) ⇒ Object
31 32 33 34 35 36 |
# File 'lib/paper_trail_diff/instrumentation.rb', line 31 def comparison_payload(association_paths:, reload_live_endpoints:) { association_paths: association_paths, reload_live_endpoints: reload_live_endpoints } end |
.instrument(event, payload) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/paper_trail_diff/instrumentation.rb', line 12 def instrument(event, payload, &) active_support = Object.const_get(:ActiveSupport) #: untyped notifications = active_support.const_get(:Notifications) #: untyped notifications.instrument( "#{event}.paper_trail_diff", payload, & ) end |
.notify(event, payload) ⇒ Object
Reports a condition rather than timing work: nothing failed, but the result may be incomplete and only the application can judge that.
25 26 27 28 |
# File 'lib/paper_trail_diff/instrumentation.rb', line 25 def notify(event, payload) instrument(event, payload) { nil } nil end |
Instance Method Details
#self?.comparison_payload ⇒ Hash[Symbol, untyped]
: (association_paths: Array, reload_live_endpoints: bool) -> Hash[Symbol, untyped]
15 |
# File 'sig/generated/paper_trail_diff/instrumentation.rbs', line 15
def self?.comparison_payload: (association_paths: Array[String], reload_live_endpoints: bool) -> Hash[Symbol, untyped]
|
#self?.instrument { ... } ⇒ Object
: (String | Symbol, Hash[Symbol, untyped]) { () -> untyped } -> untyped
7 |
# File 'sig/generated/paper_trail_diff/instrumentation.rbs', line 7
def self?.instrument: (String | Symbol, Hash[Symbol, untyped]) { () -> untyped } -> untyped
|
#self?.notify ⇒ void
This method returns an undefined value.
Reports a condition rather than timing work: nothing failed, but the result may be incomplete and only the application can judge that. : (String | Symbol, Hash[Symbol, untyped]) -> void
12 |
# File 'sig/generated/paper_trail_diff/instrumentation.rbs', line 12
def self?.notify: (String | Symbol, Hash[Symbol, untyped]) -> void
|