Commit Graph
6 Commits
Author SHA1 Message Date
bendtherules d71726205d feat(langfuse): add tool-level spans with input/output and trace-level I/O
Each MCP tool handler now sets:
- LANGFUSE_TRACE_OUTPUT_ATTR on tool spans (maps to top-level trace output)
- LANGFUSE_OBSERVATION_INPUT_ATTR and LANGFUSE_OBSERVATION_OUTPUT_ATTR
  for detailed child observation views

HTTP root span renamed to 'mcp_http_request' for consistency with stdio.
All attribute keys use constants from langfuse-transport.ts.
2026-04-27 18:56:50 +05:30
bendtherules 54bc20cb7f feat(langfuse): add tool-level spans with input/output to traces
Wrap each MCP tool handler in withSpan()/withSpanContext() to create
individual named spans per tool call:
- ask262_search_spec_sections
- ask262_get_section_content
- ask262_evaluate_in_engine262

Each span includes:
- langfuse.observation.input: JSON of tool arguments (query, sectionIds, code)
- tool name and relevant metadata as span attributes

This makes the Langfuse trace hierarchy show which MCP tool was called
and what input it received, nested under the root HTTP/stdio request span.
2026-04-27 18:31:25 +05:30
bendtherules adcbdc91c4 Add ask prompt and metadata for tool orchestration guidance 2026-04-22 19:01:43 +05:30
bendtherules 9578502bca Add basic logging 2026-04-22 12:47:17 +05:30
bendtherules 0334c5836b getSectionContent - allow multiple sectionids 2026-04-20 18:32:59 +05:30
bendtherules df5161ba86 feat: Add env support + small fixes 2026-04-16 13:18:39 +05:30