Class: LlmCostTracker::Doctor::CaptureCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/llm_cost_tracker/doctor/capture_check.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(check_class) ⇒ CaptureCheck

Returns a new instance of CaptureCheck.



10
11
12
# File 'lib/llm_cost_tracker/doctor/capture_check.rb', line 10

def initialize(check_class)
  @check_class = check_class
end

Class Method Details

.call(check_class) ⇒ Object



6
7
8
# File 'lib/llm_cost_tracker/doctor/capture_check.rb', line 6

def self.call(check_class)
  new(check_class).call
end

Instance Method Details

#callObject



14
15
16
17
18
19
20
# File 'lib/llm_cost_tracker/doctor/capture_check.rb', line 14

def call
  config = LlmCostTracker.configuration
  return disabled_check unless config.enabled
  return integrations_check(config.instrumented_integrations) if config.instrumented_integrations.any?

  check(:ok, "no SDK integrations enabled; Faraday middleware and manual capture remain available")
end