Description:
Instrument CLI entrypoints to create root spans for user-initiated operations.
Detailed Requirements:
- Create root span for each CLI command:
cli.serve - Serve command execution
cli.decompose - Decomposition command
cli.eval - Evaluation command
cli.alora - ALoRA commands
- Add command-specific attributes:
cli.command - Command name
cli.args - Sanitized argument summary (no secrets)
- Create reusable decorator or context manager for CLI tracing
- Ensure spans are properly closed even on exceptions
Files to Modify:
cli/m.py - Add tracing infrastructure
cli/serve/app.py - Instrument serve command
cli/decompose/decompose.py - Instrument decompose
cli/eval/commands.py - Instrument eval commands
cli/alora/commands.py - Instrument alora commands
Example Usage:
@app.command()
def serve(port: int = 8000):
with trace_application("cli.serve", command="serve", port=port):
# ... serve implementation
Acceptance Criteria:
Description:
Instrument CLI entrypoints to create root spans for user-initiated operations.
Detailed Requirements:
cli.serve- Serve command executioncli.decompose- Decomposition commandcli.eval- Evaluation commandcli.alora- ALoRA commandscli.command- Command namecli.args- Sanitized argument summary (no secrets)Files to Modify:
cli/m.py- Add tracing infrastructurecli/serve/app.py- Instrument serve commandcli/decompose/decompose.py- Instrument decomposecli/eval/commands.py- Instrument eval commandscli/alora/commands.py- Instrument alora commandsExample Usage:
Acceptance Criteria: