Class: LLM::Tracer::Null

Inherits:
LLM::Tracer show all
Defined in:
lib/llm/tracer/null.rb

Overview

A no-op tracer that ignores all tracing callbacks.

Instance Method Summary collapse

Methods inherited from LLM::Tracer

#flush!, #initialize, #inspect, #spans

Constructor Details

This class inherits a constructor from LLM::Tracer

Instance Method Details

#on_request_startnil

Parameters:

  • operation (String)
  • model (String)

Returns:

  • (nil)


10
11
12
# File 'lib/llm/tracer/null.rb', line 10

def on_request_start(**)
  nil
end

#on_request_finishnil

Parameters:

Returns:

  • (nil)


17
18
19
# File 'lib/llm/tracer/null.rb', line 17

def on_request_finish(**)
  nil
end

#on_request_errornil

Parameters:

Returns:

  • (nil)


24
25
26
# File 'lib/llm/tracer/null.rb', line 24

def on_request_error(**)
  nil
end

#on_tool_startnil

Parameters:

  • id (String)

    The tool call ID assigned by the model/provider

  • name (String)

    The tool (function) name.

  • arguments (Hash)

    The parsed tool arguments.

  • model (String)

    The model name

Returns:

  • (nil)


31
32
33
# File 'lib/llm/tracer/null.rb', line 31

def on_tool_start(**)
  nil
end

#on_tool_finishnil

Parameters:

Returns:

  • (nil)


38
39
40
# File 'lib/llm/tracer/null.rb', line 38

def on_tool_finish(**)
  nil
end

#on_tool_errornil

Parameters:

  • ex (Exception)

    The raised error.

  • span (Object, nil)

    The span/context object returned by #on_tool_start.

Returns:

  • (nil)


45
46
47
# File 'lib/llm/tracer/null.rb', line 45

def on_tool_error(**)
  nil
end