Class: Langfuse::CLI::Commands::Traces
- Inherits:
-
Thor
- Object
- Thor
- Langfuse::CLI::Commands::Traces
- Defined in:
- lib/langfuse/cli/commands/traces.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
9 10 11 |
# File 'lib/langfuse/cli/commands/traces.rb', line 9 def self.exit_on_failure? true end |
Instance Method Details
#get(trace_id) ⇒ Object
72 73 74 75 76 77 78 79 80 81 |
# File 'lib/langfuse/cli/commands/traces.rb', line 72 def get(trace_id) trace = client.get_trace(trace_id) output_result(trace) rescue Client::NotFoundError => e puts "Error: Trace not found - #{trace_id}" exit 1 rescue Client::APIError => e puts "Error: #{e.message}" exit 1 end |
#list ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/langfuse/cli/commands/traces.rb', line 58 def list filters = build_filters() traces = client.list_traces(filters) output_result(traces) rescue Client::AuthenticationError => e puts "Authentication Error: #{e.message}" exit 1 rescue Client::APIError => e puts "Error: #{e.message}" exit 1 end |