Before you dive in
What you’ll find in the original
- Install the TypeSafe SDK, its OpenInference instrumentor and Phoenix OpenTelemetry package, then register a tracer provider. The Python integration requires typesafe-sdk 0.6.0 or later and covers both synchronous and asynchronous system_one calls.
- Each System One call becomes an LLM span: state, model and typed questions are JSON input.value; answers and usage are output.value. These are not chat-message spans, so inspect the structured inputs and outputs rather than looking for a conversation transcript.
- Use TraceConfig to hide inputs and outputs before they leave the process, mask invocation parameters when extra_body contains sensitive fields, or suppress tracing for a block of code. Session, user and metadata attributes can still provide context around the retained spans.
Worth knowing
The linked documentation index also offers a TypeScript guide: CommonJS load-time patching must run before importing the SDK; ESM and bundled apps use manuallyInstrument. Short-lived scripts must flush pending spans. These examples were source-reviewed, not executed against a telemetry backend.