(
self, spans: typing.Sequence[ReadableSpan]
)
| 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: |
nothing calls this directly
no test coverage detected