Looking for Python? See the Python guide.
@typesafe-ai/sdk). Each TypeSafeClient.systemOne call is captured as an OpenInference LLM span with JSON input.value / output.value, model, and token usage.
Requires Node.js 20+. client.models.list() is not instrumented.
Install
Setup
Use theregister function from @arizeai/phoenix-otel to connect to Phoenix, then register the TypeSafe instrumentation.
Create the instrumentation.ts file:
Registering the instrumentation this way patches
@typesafe-ai/sdk at load time, which requires instrumentation.ts to run before the SDK is imported (CommonJS only). For ESM, bundlers, or when the SDK is imported first, call manuallyInstrument instead:Usage
Spans are exported in batches. In short-lived scripts, call
await provider.forceFlush() before the process exits so all spans are delivered to Phoenix.Observe
With instrumentation enabled, eachsystemOne call shows up in Phoenix as an LLM span containing:
- The full
stateandquestionssent to TypeSafe asinput.value(JSON) - The typed
answersreturned asoutput.value(JSON) - Model name and token usage, when reported by the SDK

Configuration
PasstraceConfig to mask sensitive request/response payloads before they leave your process:
traceConfig masking options and the SDK compatibility table.

