Skip to main content
Netra provides official SDKs for Python and TypeScript/JavaScript, enabling you to instrument your AI applications with minimal code changes. Both SDKs share the same core capabilities built on OpenTelemetry.

Choose Your SDK

Installation

pip install netra-sdk

Quick Start

from netra import Netra
from netra.instrumentation.instruments import InstrumentSet

Netra.init(
    app_name="my-ai-app",
    headers=f"x-api-key={os.getenv('NETRA_API_KEY')}",
    environment="production",
    instruments={InstrumentSet.OPENAI, InstrumentSet.LANGCHAIN},
)

What You Can Do

Core Capabilities

CapabilityDescription
Auto-InstrumentationAutomatic tracing for LLM providers, frameworks, and databases
Manual TracingCreate custom spans with full control over attributes and events
DecoratorsSimple function decoration with @agent, @task, and @workflow
Context TrackingSet user, session, and tenant IDs for filtering and analysis
Usage TrackingRecord token usage, costs, and custom metrics
Dashboard QueriesProgrammatic access to analytics and session data
EvaluationRun test suites with datasets and evaluators
SimulationMulti-turn conversation testing against your agents

Environment Variables

Configure the SDK via environment variables:
VariableDescription
NETRA_API_KEYAPI key for authentication
NETRA_APP_NAMEApplication name
NETRA_ENVEnvironment (production, staging, etc.)
NETRA_OTLP_ENDPOINTCustom OTLP endpoint URL
NETRA_TRACE_CONTENTEnable/disable content tracing
NETRA_DEBUGEnable debug logging

Next Steps

Last modified on February 13, 2026