Module: Legion::Extensions::Agentic::Memory::Trace::Helpers::ErrorTracer
- Defined in:
- lib/legion/extensions/agentic/memory/trace/helpers/error_tracer.rb
Constant Summary collapse
- DEBOUNCE_WINDOW =
seconds
60- ERROR_VALENCE =
-0.6
- ERROR_INTENSITY =
0.7- FATAL_VALENCE =
-0.8
- FATAL_INTENSITY =
0.9
Class Method Summary collapse
Class Method Details
.active? ⇒ Boolean
31 32 33 |
# File 'lib/legion/extensions/agentic/memory/trace/helpers/error_tracer.rb', line 31 def active? @active == true end |
.setup ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/legion/extensions/agentic/memory/trace/helpers/error_tracer.rb', line 17 def setup return if @active @recent = {} @recent_mutex = ::Mutex.new @runner = Object.new.extend(Legion::Extensions::Agentic::Memory::Trace::Runners::Traces) @write_queue = ::Queue.new @worker = ::Thread.new { drain_queue } @worker.name = 'legion-error-tracer' wrap_logging_methods @active = true Legion::Logging.info '[memory] ErrorTracer active — errors/fatals will become episodic traces' end |