MCPcopy Index your code
hub / github.com/google/adk-python / export

Method export

src/google/adk/cli/api_server.py:346–360  ·  view source on GitHub ↗
(
      self, spans: typing.Sequence[ReadableSpan]
  )

Source from the content-addressed store, hash-verified

344
345 @override
346 def export(
347 self, spans: typing.Sequence[ReadableSpan]
348 ) -> export_lib.SpanExportResult:
349 for span in spans:
350 trace_id = span.context.trace_id
351 attributes = dict(span.attributes)
352 session_id = attributes.get(
353 "gcp.vertex.agent.session_id", None
354 ) or attributes.get("gen_ai.conversation.id", None)
355 if session_id:
356 trace_ids = self.trace_dict.setdefault(session_id, [])
357 if trace_id not in trace_ids:
358 trace_ids.append(trace_id)
359 self._spans.extend(spans)
360 return export_lib.SpanExportResult.SUCCESS
361
362 @override
363 def force_flush(self, timeout_millis: int = 30000) -> bool:

Callers

nothing calls this directly

Calls 4

setdefaultMethod · 0.80
getMethod · 0.45
appendMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected