ApiServerSpanExporter
A custom SpanExporter that stores relevant span data. It handles two types of trace data storage:
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.Session-ID based: Stores all exported spans and maintains a mapping from
session_id(extracted fromcall_llmspans) to a list oftrace_ids. This is used for retrieving all spans related to a session.