# Class DebugController

java.lang.Object
com.google.adk.web.controller.DebugController

@RestController public class DebugController extends Object
Controller handling debug and tracing endpoints.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DebugController(ApiServerSpanExporter apiServerSpanExporter)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.springframework.http.ResponseEntity<Object>`
  `getSessionTrace(String sessionId)`
  Retrieves trace spans for a given session ID.
  `org.springframework.http.ResponseEntity<?>`
  `getTraceDict(String eventId)`
  Endpoint for retrieving trace information stored by the ApiServerSpanExporter, based on event ID.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DebugController

    @Autowired public DebugController(ApiServerSpanExporter apiServerSpanExporter)

- ## Method Details

  - ### getTraceDict

    @GetMapping("/debug/trace/{eventId}") public org.springframework.http.ResponseEntity<?> getTraceDict(@PathVariable String eventId)
    Endpoint for retrieving trace information stored by the ApiServerSpanExporter, based on event ID.
    Parameters:
      `eventId` - The ID of the event to trace (expected to be gcp.vertex.agent.event_id).
    Returns:
      A ResponseEntity containing the trace data or NOT_FOUND.

  - ### getSessionTrace

    @GetMapping("/debug/trace/session/{sessionId}") public org.springframework.http.ResponseEntity<Object> getSessionTrace(@PathVariable String sessionId)
    Retrieves trace spans for a given session ID.
    Parameters:
      `sessionId` - The session ID.
    Returns:
      A ResponseEntity containing a list of span data maps for the session, or an empty list.