(app_name: str, session_id: str)
| 470 | tags=[TAG_DEBUG], |
| 471 | ) |
| 472 | async def get_session_trace(app_name: str, session_id: str) -> Any: |
| 473 | spans = memory_exporter.get_finished_spans(session_id) |
| 474 | if not spans: |
| 475 | return [] |
| 476 | return [ |
| 477 | { |
| 478 | "name": s.name, |
| 479 | "span_id": s.context.span_id, |
| 480 | "trace_id": s.context.trace_id, |
| 481 | "start_time": s.start_time, |
| 482 | "end_time": s.end_time, |
| 483 | "attributes": dict(s.attributes), |
| 484 | "parent_span_id": s.parent.span_id if s.parent else None, |
| 485 | } |
| 486 | for s in spans |
| 487 | ] |
| 488 | |
| 489 | if web_assets_dir: |
| 490 | # TODO: remove this endpoint once build_graph_image is completed |
nothing calls this directly
no test coverage detected