Closed (fixed)
Project:
Langfuse
Version:
1.0.1-alpha1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Nov 2025 at 16:37 UTC
Updated:
22 Dec 2025 at 22:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #8
nikro commentedAlright pushed some stuff straight into the main for now:
+ Add trace manager service - Core service and interface
+ Register trace manager service - Service definition
+ Use trace manager in AI subscriber - Refactored to use centralized trace logic
+ Register tool and search span subscribers - Service registrations
+ Track AI agent tool executions - Tool span subscriber
+ Track Search API queries - Search span subscriber for RAG
TLDR - now we can hierarchically track any tool-call and also we bolted in a specialized logic for ai_search_block (which doesn't use any tool) - basically if the ai_search query is performed, we create also a span for it.
Comment #18
nikro commentedMore changes - as previous ones ignored some things:
I had to split the ai logging sub-module into 3 separate sub-modules: general ai, ai agents and search - because they actually depend on separate module:
This structure keeps AI Agents and AI Search logging optional submodules (wiring only when those contrib modules are enabled) while preserving a single runner-context system the rest of the code can rely on.
Comment #19
nikro commentedComment #20
nikro commentedAfter anlyzing this live with Frederik Wouters, we discovered that it misbehaves when used under Deepchat.
More fixes done:
Termination Flow Consolidation
Removed duplicate
KernelEvents::TERMINATEhandler from langfuse_ai_logging. The root LangfuseSyncSubscriber in web/modules/custom/langfuse/src/EventSubscriber/LangfuseSyncSubscriber.php now exclusively finalizes traces, updates metadata (final timestamp/output), clears the active trace, and runs syncTraces().DeepChat-Friendly Trace Management
Comment #29
nikro commentedSo last updates were as following:
- Kept unified terminate subscriber.
- But, removed the deepchat attempted integration - as it requires way more changes than I thought - especially SDK changes. I'll leave it for now as a separate ticket.
Comment #30
wouters_f commentedComment #31
nikro commentedDone, made a new alpha1 release with this in it.
Thanks!