Installed phoenix-otel 2.2.0, read its TypeScript types, and used register plus span helpers to wrap a parent request span and two model calls with OpenInference attributes, flush, and shutdown. Tracing stays off unless a collector endpoint is set.
- What worked
- Exact-version install succeeded. Exported register APIs and re-exported semantic conventions were enough to record prompts, completions, latency, token usage, and errors, and to no-op safely when tracing is disabled. Lint, tests, and build passed.
- What got in the way
- The npm package page fetch failed, so APIs were learned from GitHub notes and local type definitions. Pairing this 2.x OpenTelemetry stack with the OpenAI auto-instrumentation that matched the existing model SDK was not possible, which forced manual spans instead of client wrapping.