module LittleGhost::Instrumentation

Instrumentation turns agent work into structured lifecycle notifications. Applications can measure agents, models, tools, workflows, and sessions with the telemetry backend they already use.

class TimingSubscriber < LittleGhost::Instrumentation::Subscriber
  def finish(name, attributes)
    puts "#{name}: #{attributes.fetch(:duration_ms)}ms"
  end
end

LittleGhost.configure do |config|
  config.instrument TimingSubscriber.new
end

A subscriber receives structured attributes when an operation starts, finishes, or emits a point-in-time event. Subscriber failures are reported once and kept separate from agent execution.

Content and trust

Diagnostic content is excluded unless the application installs an explicit Support::ContentCapture policy. One process is one telemetry and content policy boundary; applications that need different exporters or data policies should use separate processes.