一键导入
create-tracing-module
Creates the tracing.py module with enable_tracing(), health check, and framework-specific autolog configuration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Creates the tracing.py module with enable_tracing(), health check, and framework-specific autolog configuration.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | create-tracing-module |
| description | Creates the tracing.py module with enable_tracing(), health check, and framework-specific autolog configuration. |
| argument-hint | <agent_path> [framework] |
| disable-model-invocation | true |
tracing.py)Usage:
/create-tracing-module <agent_path>Example:/create-tracing-module agents/autogen/chat_agent
You are creating the tracing.py file for a new agent template, following this repo's established patterns.
The agent path is: $ARGUMENTS
You also need the framework name (e.g., autogen, langgraph, crewai) and the autolog support report (which classifies the framework as Level A, B, or C). The framework may be included as a second word in $ARGUMENTS. If not provided, determine it from the agent's pyproject.toml dependencies.
If the autolog report is not available in the current conversation context, invoke the check-autolog-support skill (i.e., /agentic-starter-kits-skills:check-autolog-support) with the framework name to produce the report before continuing.
Read tracing.md at the repo root for the full tracing architecture, design principles, and how each existing agent integrates with MLflow.
Read the reference tracing.py that matches the coverage level. These are the source of truth — follow their patterns exactly:
agents/langgraph/react_agent/src/react_agent/tracing.pyagents/google/adk/src/adk_agent/tracing.pyagents/crewai/websearch_agent/src/crewai_web_search/tracing.pyagents/vanilla_python/openai_responses_agent/src/openai_responses_agent/tracing.pyCreate the file at: <agent_path>/src/<package_name>/tracing.py
The <package_name> is the Python package name — find it by looking at the existing src/ directory or pyproject.toml [tool.setuptools.packages.find].
Copy these exactly from the reference file — they are identical across all agents:
logging.getLogger("tracing") with handler)check_mlflow_health() function (retry loop with time budget)enable_tracing() skeleton (load_dotenv, MLFLOW_TRACKING_URI check, health check with graceful degradation, set_tracking_uri, set_experiment, enable_async_logging)The only parts that differ between levels are inside enable_tracing() and whether wrap_func_with_mlflow_trace() exists:
Level A (autolog variant) — Read the LangGraph reference. Adapt by:
import mlflow.langchain / mlflow.langchain.autolog() with the correct module for the new framework (from the autolog report)wrap_func_with_mlflow_trace() neededLevel A (OTel variant) — Read the Google ADK reference. Use this when the framework has no mlflow.<framework>.autolog() but natively emits OpenTelemetry spans. Adapt by:
TracerProvider with OTLPSpanExporter pointing at {tracking_uri}/v1/tracesx-mlflow-experiment-id header (get it from mlflow.set_experiment())--backend-store-uri sqlite:///mlflow.db)opentelemetry-exporter-otlp-proto-httpwrap_func_with_mlflow_trace() neededLevel B — Read the CrewAI reference. Adapt by:
mlflow.crewai → mlflow.<new_framework>)provider_autolog_map + LLM_PROVIDER routingwrap_func_with_mlflow_trace() as-is (with name parameter)Level C — Read the Vanilla Python reference. Adapt by:
wrap_func_with_mlflow_trace() as-isAfter creating the file, verify:
check_mlflow_health() is identical to the referenceenable_tracing() has graceful degradation (returns on unreachable server, doesn't crash)enable_tracing() / wrap_func_with_mlflow_trace(), not at module top)wrap_func_with_mlflow_trace() returns the original function unchanged when MLFLOW_TRACKING_URI is not setenable_async_logging() is called before autologBefore finishing, check whether this skill file needs updating. If any of the following are true, propose the specific changes to the user and only update this file if they approve:
If nothing needed changing, move on.
Deploy agents to OpenShift with auto-detected cluster config and refresh MLflow tracking tokens.
Add integration deployment tests (health-check on OpenShift) to any agent in the agentic-starter-kits repo — standard, external-registry, or pre-deployed. Creates conftest.py, test_deployment.py, __init__.py, adds test-integration Makefile target, and updates the CI workflow matrix. Use when implementing integration tests, deployment tests, or health-check tests for a new agent.
Validate whether a new agent template or example belongs in the agentic-starter-kits repo. Two modes: idea mode (interactive questionnaire, no code yet) or existing agent mode (auto-extract from code). Produces a GitHub Discussion draft with fit score and recommendations. Use when proposing a new agent, reviewing an existing contribution's fit, or before writing code for a new template.
Add behavioral testing (pytest + EvalHub) to an agent in the agentic-starter-kits repo. Covers runner compatibility, test files, golden queries, thresholds, EvalHub fixture, Containerfile, docs, and MLflow tracing verification. Use when implementing behavioral tests for a new agent or when the user mentions btest, behavioral tests, eval coverage, or test harness integration.
Adds manual MLflow trace wrapping for tool and agent spans in Level B and C agents where autolog doesn't cover everything.
Researches and classifies a framework's MLflow autolog support level (A, B, or C) to determine what manual tracing is needed.