Class: ActiveAgent::Dashboard::TracesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- ActiveAgent::Dashboard::TracesController
- Defined in:
- lib/active_agent/dashboard/app/controllers/active_agent/dashboard/traces_controller.rb
Overview
Controller for viewing telemetry traces.
Provides:
- List view with filtering and pagination
- Detail view with span timeline
- Metrics overview
- Live updates via Turbo Streams
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/active_agent/dashboard/app/controllers/active_agent/dashboard/traces_controller.rb', line 13 def index @traces = fetch_traces @metrics = calculate_metrics respond_to do |format| format.html # turbo-rails is optional; responding to an unregistered MIME # type raises in host apps without it. format.turbo_stream if turbo_stream_available? end end |
#metrics ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/active_agent/dashboard/app/controllers/active_agent/dashboard/traces_controller.rb', line 29 def metrics @metrics = calculate_metrics @agent_stats = agent_statistics @time_series = time_series_data respond_to do |format| format.html format.turbo_stream if turbo_stream_available? end end |
#show ⇒ Object
25 26 27 |
# File 'lib/active_agent/dashboard/app/controllers/active_agent/dashboard/traces_controller.rb', line 25 def show @trace = scoped_traces.find(params[:id]) end |