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

  1. Wrap each critical operation in Netra.start_span(...).
  2. Set span attributes (model, llm_system, operation keys).
  3. Attach usage via UsageModel.
  4. Attach actions via ActionModel.
  5. Add events for checkpoints and failures.

Python Pattern

from netra import Netra, UsageModel, ActionModel
Related skills
Installs
2
First Seen
Mar 25, 2026