Skip to content

feat(tracing): add Kayba tracing SDK#125

Merged
davidfarah2003 merged 2 commits intomainfrom
add_trace_sdk
Apr 11, 2026
Merged

feat(tracing): add Kayba tracing SDK#125
davidfarah2003 merged 2 commits intomainfrom
add_trace_sdk

Conversation

@davidfarah2003
Copy link
Copy Markdown
Contributor

Summary

  • Add ace.tracing module — a thin wrapper around MLflow tracing that sends traces to the Kayba backend
  • experiment= maps to Kayba's folder concept (no MLflow experiment API dependency)
  • Folder names are sanitized against HTML/SQL injection and capped at 256 chars

Changes

  • ace/tracing/ — new package with configure(), @trace, start_span(), folder management, enable/disable, search
  • ace/__init__.py — re-export configure_tracing
  • pyproject.toml — add tracing optional extra (mlflow dependency)
  • docs/integrations/tracing.md — user-facing tracing docs
  • agent-guides/tracing-sdk.md — internal agent guide for the SDK
  • examples/tracing_glm_example.py — two-agent pipeline example using GLM 5.1
  • tests/test_tracing.py — 26 unit tests (configure, sanitization, decorator, re-exports)

Test plan

  • uv run pytest tests/test_tracing.py -v — all 26 tests pass
  • Manually verified trace upload to Kayba dashboard with folder='sdk-test'
  • Verified GLM 5.1 example runs end-to-end with real LLM calls

Adds ace.tracing module that wraps MLflow behind a Kayba-branded API.
Users install ace-framework[tracing] and call configure(api_key=...) to
send traces to the Kayba dashboard — MLflow is never exposed.

API: configure(), @trace, start_span(), set_folder(), enable/disable.
…mple

- experiment= is now an alias for folder= (no mlflow.set_experiment call)
- Folder names are sanitized: HTML stripped, allowlist enforced, capped at 256 chars
- Add GLM 5.1 two-agent example (examples/tracing_glm_example.py)
- Add agent guide for tracing SDK (agent-guides/tracing-sdk.md)
@davidfarah2003 davidfarah2003 merged commit 2e7ef07 into main Apr 11, 2026
0 of 3 checks passed
@davidfarah2003 davidfarah2003 deleted the add_trace_sdk branch April 11, 2026 15:42
@davidfarah2003 davidfarah2003 restored the add_trace_sdk branch April 11, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant