Class: Langfuse::Tool
- Inherits:
-
BaseObservation
- Object
- BaseObservation
- Langfuse::Tool
- Defined in:
- lib/langfuse/observations.rb
Overview
Observation for tracking individual tool calls and external API interactions.
Instance Attribute Summary
Attributes inherited from BaseObservation
#otel_span, #otel_tracer, #type
Instance Method Summary collapse
-
#initialize(otel_span, otel_tracer, attributes: nil) ⇒ Tool
constructor
A new instance of Tool.
- #update(attrs) ⇒ self
Methods inherited from BaseObservation
#current_span, #end, #event, #id, #input=, #level=, #metadata=, #output=, #start_observation, #trace_id, #trace_url, #update_trace
Constructor Details
#initialize(otel_span, otel_tracer, attributes: nil) ⇒ Tool
Returns a new instance of Tool.
413 414 415 |
# File 'lib/langfuse/observations.rb', line 413 def initialize(otel_span, otel_tracer, attributes: nil) super(otel_span, otel_tracer, attributes: attributes, type: OBSERVATION_TYPES[:tool]) end |
Instance Method Details
#update(attrs) ⇒ self
419 420 421 422 |
# File 'lib/langfuse/observations.rb', line 419 def update(attrs) update_observation_attributes(attrs) self end |