netra-custom-spans-and-actions
Installation
SKILL.md
Netra Custom Spans And Actions
Use this skill when auto/decorator tracing is not enough and you need explicit span lifecycle control.
When To Use
- You need spans around external APIs, tool calls, or batch steps.
- You need usage/cost tracking per operation.
- You need structured action records for DB/API side effects.
Procedure
- Wrap each critical operation in
Netra.start_span(...). - Set span attributes (
model,llm_system, operation keys). - Attach usage via
UsageModel. - Attach actions via
ActionModel. - Add events for checkpoints and failures.
Python Pattern
from netra import Netra, UsageModel, ActionModel