ApiServerSpanExporter

class ApiServerSpanExporter : SpanExporter

A custom SpanExporter that stores relevant span data. It handles two types of trace data storage:

  1. Event-ID based: Stores attributes of specific spans (call_llm, send_data, tool_response) keyed by gcp.vertex.agent.event_id. This is used for debugging individual events.

  2. Session-ID based: Stores all exported spans and maintains a mapping from session_id (extracted from call_llm spans) to a list of trace_ids. This is used for retrieving all spans related to a session.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun export(spans: Collection<SpanData>): CompletableResultCode
Link copied to clipboard
open override fun flush(): CompletableResultCode
Link copied to clipboard
fun getAllExportedSpans(): List<SpanData>
Link copied to clipboard
Link copied to clipboard
open override fun shutdown(): CompletableResultCode