Class: Honeybadger::ActiveAgentSubscriber

Inherits:
NotificationSubscriber show all
Defined in:
lib/honeybadger/plugins/active_agent.rb

Instance Method Summary collapse

Methods inherited from NotificationSubscriber

#finish, #process?, #record, #record_metrics, #start

Methods included from InstrumentationHelper

#decrement_counter, #extract_attributes, #extract_callable, #gauge, #histogram, #increment_counter, #metric_agent, #metric_attributes, #metric_instrumentation, #metric_source, #monotonic_timer, #time

Instance Method Details

#format_payload(name, payload) ⇒ Object



27
28
29
30
31
32
33
34
35
36
# File 'lib/honeybadger/plugins/active_agent.rb', line 27

def format_payload(name, payload)
  case name
  when "prompt.active_agent"
    payload.slice(:provider, :provider_module, :trace_id, :model, :message_count, :stream, :usage, :finish_reason, :response_model, :response_id, :temperature, :max_tokens, :top_p, :tool_count, :has_instructions)
  when "embed.active_agent"
    payload.slice(:provider, :provider_module, :trace_id, :model, :input_size, :embedding_count, :usage, :response_model, :response_id, :encoding_format, :dimensions)
  else
    payload
  end
end