Skip to content

Extract langfuse tracing setup for google-adk to more general location#31

Merged
fcogidi merged 2 commits into
mainfrom
fco/refactor_tracing_setup
Feb 3, 2026
Merged

Extract langfuse tracing setup for google-adk to more general location#31
fcogidi merged 2 commits into
mainfrom
fco/refactor_tracing_setup

Conversation

@fcogidi
Copy link
Copy Markdown
Collaborator

@fcogidi fcogidi commented Feb 3, 2026

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

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🔧 Refactoring (no functional changes)
  • ⚡ Performance improvement
  • 🧪 Test improvements
  • 🔒 Security fix

Changes Made

  • Moved Google ADK tracing setup into aieng.agent_evals.langfuse and generalized service naming
  • Deleted tracing.py and updated knowledge agent exports to use the shared module
  • Added usage examples to init_tracing docstring

Testing

  • Tests pass locally (uv run pytest tests/)
  • Type checking passes (uv run mypy <src_dir>)
  • Linting passes (uv run ruff check src_dir/)
  • Manual testing performed (describe below)

Manual testing details:

Screenshots/Recordings

Related Issues

Deployment Notes

Checklist

  • Code follows the project's style guidelines
  • Self-review of code completed
  • Documentation updated (if applicable)
  • No sensitive information (API keys, credentials) exposed

@fcogidi fcogidi requested review from amrit110, Copilot and lotif February 3, 2026 19:06
@fcogidi fcogidi self-assigned this Feb 3, 2026
@fcogidi fcogidi added the refactor Refactor or clean up code structure label Feb 3, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and is_tracing_enabled functions from the knowledge agent module to the shared langfuse module
  • Added a service_name parameter to init_tracing to support multiple services
  • Deleted the knowledge agent's tracing.py file 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.

Comment thread aieng-eval-agents/aieng/agent_evals/langfuse.py Outdated
Copy link
Copy Markdown
Member

@amrit110 amrit110 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for the refactor!

@fcogidi fcogidi merged commit 54ae499 into main Feb 3, 2026
3 checks passed
@fcogidi fcogidi deleted the fco/refactor_tracing_setup branch February 3, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactor or clean up code structure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants