netra-decorator-instrumentation
Netra Decorator Instrumentation
Use this skill to choose the right tracing method and implement decorator-based semantic spans with clear boundaries.
Supported Tracing Methods (Python + TypeScript)
Based on Netra Traces and SDK overview pages, there are three tracing methods in both languages:
| Method | Python | TypeScript | Best For |
|---|---|---|---|
| Auto-Instrumentation | Netra.init(...) before provider/framework imports |
new Netra(...) initialization at app startup |
Fastest setup, supported libraries, zero code changes |
| Decorators | @workflow, @agent, @task, @span |
@workflow, @agent, @task, @span |
Semantic application spans with minimal code changes |
| Manual Tracing | Netra.start_span(...) (context manager) |
Netra.startSpan(...) / explicit end() |
Fine-grained custom spans and lifecycle control |
Decorators should be your default for application semantics. Use manual spans for edge cases and auto-instrumentation for provider/framework coverage.
More from keyvaluesoftwaresystems/netra-skills
netra-best-practices
Code-first Netra best-practices playbook covering setup, instrumentation, context tracking, custom spans/metrics, integration patterns, evaluation, simulation, and troubleshooting.
34netra-mcp-usage
Netra MCP trace-debugging workflow focused on query_traces, get_trace_by_id, and get_session_details, including exact input parameters, filter schema, operators, sorting, and pagination patterns.
19netra-simulation-setup
Set up Netra multi-turn simulations with scenario definitions, personas, fact checkers, evaluator configuration, and test-run analysis. Use to validate agent behavior before production.
4netra-evaluation-setup
Set up high-quality Netra evaluations with datasets, evaluator design, variable mapping, and repeatable test runs. Use for regression detection and quality benchmarking.
4netra-setup
Install and initialize the Netra SDK with environment-safe defaults, instrument selection, and shutdown handling.
2netra-context-tracking
Implement request/session/user/tenant context tracking and conversation logging with Netra.
2