Class: VSM::Monitoring
- Inherits:
-
Object
- Object
- VSM::Monitoring
- Defined in:
- lib/vsm/observability/ledger.rb
Constant Summary collapse
- LOG =
File.(".vsm.log.jsonl", Dir.pwd)
Instance Method Summary collapse
Instance Method Details
#handle ⇒ Object
22 |
# File 'lib/vsm/observability/ledger.rb', line 22 def handle(*) = false |
#observe(bus) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/vsm/observability/ledger.rb', line 9 def observe(bus) bus.subscribe do |msg| event = { ts: Time.now.utc.iso8601, kind: msg.kind, path: msg.path, corr_id: msg.corr_id, meta: msg. } File.open(LOG, "a") { |f| f.puts(event.to_json) } rescue nil end end |