honeybadger 6.7.0 → 6.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afa4582b4bb18d1f9afc94a2c551ceb45643ef57be27e071f4878970bde4dfdb
4
- data.tar.gz: e80f53bbd49fd9db0d0334b5fceb9d0153a4e78272fb460209e6741300299e0d
3
+ metadata.gz: 203e658ee370b40e5af624779fa918ce92f73a25f54aaad25cc8f56218ff9871
4
+ data.tar.gz: 377e38be40593894c61a51945d9c0a970cb234da182ea5be6606cd9222a9c976
5
5
  SHA512:
6
- metadata.gz: d4086244d6d9857f5a49be22a889ca5b3b9bb789bc9015ff08732810428930e03d9b0e4b56149f670c3b1e5321497d795c5af9f21290630b80ed83c117aaa71d
7
- data.tar.gz: f81135eefd9c61f33f27666e3e7ea7c94537dddaa19cc5e770765505f322ad62bf2096469a7abc2395bb1f0e78a9ea43309592c3580aae47e158299178cf6dd1
6
+ metadata.gz: ea11c7a882c60aeffd66aa9bf76c80d85c1f2d2d42db07f24e2d832fbdaa1e4104365a853fe847746382ea2e59c93a59f70bd76c5f515c238affb98d773c4252
7
+ data.tar.gz: f870102c45a9dc81e354d28f1346ca282d6be91db181d70884b9eb13126a95cc2e219ad1eb3f4b36b20fb0c713eab3c50ee702ebea5a1613f73884ea23a10237
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Change Log
2
2
 
3
3
 
4
+ ## [6.8.0](https://github.com/honeybadger-io/honeybadger-ruby/compare/v6.7.0...v6.8.0) (2026-06-10)
5
+
6
+
7
+ ### Features
8
+
9
+ * add RubyLLM monitoring plugin ([#827](https://github.com/honeybadger-io/honeybadger-ruby/issues/827)) ([4b2c32d](https://github.com/honeybadger-io/honeybadger-ruby/commit/4b2c32d933b1dd35599b2a292027d50458f2c384))
10
+
4
11
  ## [6.7.0](https://github.com/honeybadger-io/honeybadger-ruby/compare/v6.6.2...v6.7.0) (2026-06-05)
5
12
 
6
13
 
@@ -574,6 +574,11 @@ module Honeybadger
574
574
  description: "Enable automatic data collection for Flipper.",
575
575
  default: true,
576
576
  type: Boolean
577
+ },
578
+ "ruby_llm.insights.enabled": {
579
+ description: "Enable automatic data collection for RubyLLM.",
580
+ default: true,
581
+ type: Boolean
577
582
  }
578
583
  }.freeze
579
584
 
@@ -0,0 +1,53 @@
1
+ require "honeybadger/plugin"
2
+ require "honeybadger/notification_subscriber"
3
+
4
+ module Honeybadger
5
+ module Plugins
6
+ module RubyLLM
7
+ Plugin.register :ruby_llm do
8
+ requirement { defined?(::RubyLLM) }
9
+ requirement { defined?(::ActiveSupport::Notifications) }
10
+
11
+ execution do
12
+ if config.load_plugin_insights?(:ruby_llm)
13
+ # request.ruby_llm is intentionally excluded: it fires for every
14
+ # provider HTTP request (including retries and streams) and
15
+ # duplicates chat-level metadata.
16
+ ::ActiveSupport::Notifications.subscribe(
17
+ /(chat|tool_call|embedding|image|moderation|transcription|models\.refresh)\.ruby_llm/,
18
+ Honeybadger::RubyLLMSubscriber.new
19
+ )
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+
27
+ module Honeybadger
28
+ class RubyLLMSubscriber < NotificationSubscriber
29
+ # Payloads carry full Ruby objects (chat, messages, responses, tool
30
+ # arguments, inputs), which may contain sensitive content. Allow only
31
+ # scalar metadata through.
32
+ def format_payload(name, payload)
33
+ case name
34
+ when "chat.ruby_llm"
35
+ payload.slice(:provider, :provider_class, :model, :message_count, :temperature, :tool_choice, :tool_call_limit, :streaming, :response_model, :response_role, :tool_call, :input_tokens, :output_tokens, :cached_tokens, :cache_creation_tokens, :thinking_tokens, :exception)
36
+ when "tool_call.ruby_llm"
37
+ payload.slice(:provider, :provider_class, :model, :tool_name, :tool_call_id, :result_class, :exception)
38
+ when "embedding.ruby_llm"
39
+ payload.slice(:provider, :provider_class, :model, :dimensions, :response_model, :input_tokens, :embedding_dimensions, :embedding_count, :exception)
40
+ when "image.ruby_llm"
41
+ payload.slice(:provider, :provider_class, :model, :size, :response_model, :exception)
42
+ when "moderation.ruby_llm"
43
+ payload.slice(:provider, :provider_class, :model, :flagged, :exception)
44
+ when "transcription.ruby_llm"
45
+ payload.slice(:provider, :provider_class, :model, :language, :response_model, :input_tokens, :output_tokens, :exception)
46
+ when "models.refresh.ruby_llm"
47
+ payload.slice(:remote_only, :model_count, :exception)
48
+ else
49
+ payload.slice(:provider, :provider_class, :model, :exception)
50
+ end
51
+ end
52
+ end
53
+ end
@@ -1,4 +1,4 @@
1
1
  module Honeybadger
2
2
  # The current String Honeybadger version.
3
- VERSION = "6.7.0".freeze
3
+ VERSION = "6.8.0".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honeybadger
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.7.0
4
+ version: 6.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Honeybadger Industries LLC
@@ -122,6 +122,7 @@ files:
122
122
  - lib/honeybadger/plugins/passenger.rb
123
123
  - lib/honeybadger/plugins/rails.rb
124
124
  - lib/honeybadger/plugins/resque.rb
125
+ - lib/honeybadger/plugins/ruby_llm.rb
125
126
  - lib/honeybadger/plugins/shoryuken.rb
126
127
  - lib/honeybadger/plugins/sidekiq.rb
127
128
  - lib/honeybadger/plugins/solid_queue.rb