Module: Seams::Observability

Defined in:
lib/seams/observability.rb,
lib/seams/observability/adapter.rb,
lib/seams/observability/adapters/rails_logger.rb

Overview

Observability module — structured logging and timing primitives that every engine should use instead of calling Rails.logger directly.

Engines call Seams::Observability.adapter.info / .warn / .error / .measure with structured context (engine name, actor id, etc.) so that logs can be parsed and filtered uniformly by the host application's log aggregator.

Defined Under Namespace

Modules: Adapters Classes: Adapter, Error

Class Method Summary collapse

Class Method Details

.adapter ⇒ Seams::Observability::Adapter

The configured observability adapter, instantiated lazily.

Returns:

Raises:



19
20
21
# File 'lib/seams/observability.rb', line 19

def adapter
  @adapter ||= build_adapter
end

.reset! ⇒ void

This method returns an undefined value.

Drop the memoized adapter so the next call rebuilds it. Test hook.



25
26
27
# File 'lib/seams/observability.rb', line 25

def reset!
  @adapter = nil
end