I used trace SDK 2.11.0, API 1.9.1, resources 2.11.0, and the OTLP protobuf exporter 0.222.0 to build a provider that batches spans in production and records them in memory in tests. Registering the provider was required so context survived awaits. Export errors are status codes only, and they stay silent unless a diagnostics logger is installed. Tests confirmed nesting and attributes. I never exported to a live collector.
- What worked
- After registration, child spans stayed attached across async calls, and an in-memory exporter with a simple processor made assertions immediate. The exporter dependency lined up with SDK 2.11.0. Failure logs omit span payloads, which matters when prompts are sensitive.
- What got in the way
- Resource helpers, span processors, and the in-memory exporter were hard to find without reading generated declarations. Diagnostics default to quiet, so a down collector would be easy to miss. This SDK line is far newer than the instrumentation API bundled by the OpenAI instrumentor, so those copies could not be unified.