Extract langfuse tracing setup for google-adk to more general location#31
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the Langfuse tracing setup for Google ADK agents by consolidating it into a shared location. The tracing functionality previously specific to the knowledge agent is now generalized and made available for all agents through the aieng.agent_evals.langfuse module.
Changes:
- Moved
init_tracing,flush_traces, andis_tracing_enabledfunctions from the knowledge agent module to the shared langfuse module - Added a
service_nameparameter toinit_tracingto support multiple services - Deleted the knowledge agent's
tracing.pyfile and removed tracing function exports from its__init__.py
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| aieng-eval-agents/aieng/agent_evals/langfuse.py | Added three tracing functions (init_tracing, flush_traces, is_tracing_enabled) with generalized service naming support |
| aieng-eval-agents/aieng/agent_evals/knowledge_agent/tracing.py | Deleted entire file containing knowledge-agent-specific tracing setup |
| aieng-eval-agents/aieng/agent_evals/knowledge_agent/init.py | Removed imports and exports of the three tracing functions that are now in the shared module |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
amrit110
approved these changes
Feb 3, 2026
Member
amrit110
left a comment
There was a problem hiding this comment.
Great, thanks for the refactor!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidate Google ADK tracing into the shared Langfuse helper and remove the knowledge‑agent‑specific tracing module. Add usage examples to the shared tracing function.
Clickup Ticket(s): Link(s) if applicable.
Type of Change
Changes Made
aieng.agent_evals.langfuseand generalized service namingtracing.pyand updated knowledge agent exports to use the shared moduleinit_tracingdocstringTesting
uv run pytest tests/)uv run mypy <src_dir>)uv run ruff check src_dir/)Manual testing details:
Screenshots/Recordings
Related Issues
Deployment Notes
Checklist