Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/honeybadger/config/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,11 @@ class Boolean; end
default: false,
type: Boolean
},
"active_agent.insights.enabled": {
description: "Enable automatic data collection for Active Agent.",
default: true,
type: Boolean
},
"active_job.attempt_threshold": {
description: "The number of attempts before notifications will be sent.",
default: 0,
Expand Down
16 changes: 16 additions & 0 deletions lib/honeybadger/plugins/active_agent.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require "honeybadger/plugin"
require "honeybadger/ruby"
require "honeybadger/notification_subscriber"

module Honeybadger
Plugin.register :active_agent do
requirement { defined?(::ActiveAgent) }

execution do
if config.load_plugin_insights?(:active_agent)
# TODO: NotificationSubscriber may be the wrong thing to use here, or we may want to subclass it.
::ActiveSupport::Notifications.subscribe(/(prompt|embed|stream_open|stream_close|stream_chunk|tool_call|process|provider)\.active_agent/, Honeybadger::NotificationSubscriber.new)
end
end
end
end
Loading