netra-sdk 1.12.1 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,6 +22,17 @@ npm install netra-sdk
22
22
 
23
23
  ## 🚀 Quick Start
24
24
 
25
+ ### Set the Endpoint and API Key
26
+
27
+ Set these before you call `Netra.init()`, wherever your app runs (your shell, Docker containers, CI jobs). Without `NETRA_OTLP_ENDPOINT`, the SDK prints spans to the console instead of sending them to Netra, and your dashboard stays empty.
28
+
29
+ ```bash
30
+ # US region
31
+ export NETRA_OTLP_ENDPOINT="https://api.getnetra.ai/telemetry"
32
+ # EU region: export NETRA_OTLP_ENDPOINT="https://api.eu.getnetra.ai/telemetry"
33
+ export NETRA_API_KEY="your-api-key-here"
34
+ ```
35
+
25
36
  ### Basic Setup
26
37
 
27
38
  Initialize the Netra SDK at the start of your application (entry point). The `init()` method is async and waits for all instrumentations to be ready before returning:
@@ -31,7 +42,7 @@ import { Netra, NetraInstruments } from "netra-sdk";
31
42
 
32
43
  await Netra.init({
33
44
  appName: "my-ai-app",
34
- headers: `x-api-key=${process.env.NETRA_API_KEY}`, // Optional: Send traces to Netra Platform
45
+ headers: `x-api-key=${process.env.NETRA_API_KEY}`,
35
46
  environment: "production",
36
47
  // Optional: Select specific instruments
37
48
  instruments: new Set([NetraInstruments.OPENAI, NetraInstruments.LANGCHAIN]),
@@ -110,6 +121,7 @@ The SDK supports automatic instrumentation for various providers and frameworks:
110
121
  - Mistral AI
111
122
  - Groq
112
123
  - Together AI
124
+ - TypeSafe (Jev) - `systemOne` calls via the `@typesafe-ai/sdk` client
113
125
  - Ollama
114
126
  - Bedrock (AWS)
115
127
 
@@ -279,6 +291,7 @@ You can configure the SDK using environment variables:
279
291
 
280
292
  | Variable | Description |
281
293
  |----------|-------------|
294
+ | `NETRA_OTLP_ENDPOINT` | Netra endpoint: `https://api.getnetra.ai/telemetry` (US) or `https://api.eu.getnetra.ai/telemetry` (EU). Required to send traces to Netra; falls back to `OTEL_EXPORTER_OTLP_ENDPOINT`, and if neither is set, spans are printed to the console |
282
295
  | `NETRA_API_KEY` | API Key for Netra Platform |
283
296
  | `NETRA_APP_NAME` | Name of your application |
284
297
  | `NETRA_ENV` | Environment (e.g., prod, dev) |