Class: DSPy::Subscribers::NewrelicSubscriber
- Inherits:
-
Object
- Object
- DSPy::Subscribers::NewrelicSubscriber
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/subscribers/newrelic_subscriber.rb
Overview
New Relic subscriber that creates custom metrics and traces for DSPy operations Provides comprehensive monitoring for optimization operations and performance tracking
Defined Under Namespace
Classes: NewrelicConfig
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
-
#initialize(config: nil) ⇒ NewrelicSubscriber
constructor
A new instance of NewrelicSubscriber.
Constructor Details
#initialize(config: nil) ⇒ NewrelicSubscriber
Returns a new instance of NewrelicSubscriber.
67 68 69 70 71 72 |
# File 'lib/dspy/subscribers/newrelic_subscriber.rb', line 67 def initialize(config: nil) @config = config || NewrelicConfig.new @optimization_transactions = T.let({}, T::Hash[String, T.untyped]) setup_event_subscriptions if @config.enabled end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
64 65 66 |
# File 'lib/dspy/subscribers/newrelic_subscriber.rb', line 64 def config @config end |