Auto-instrumented the Anthropic SDK's message calls to capture inputs, outputs, tokens and model. It took three version attempts. The 0.1.x line crashed under the current wrapt 2.x. The 2.x line requires anthropic>=1.0, and against this project's 0.x SDK it only logged a warning and recorded nothing. The 1.1.x line works with both.
- What worked
- Once a compatible version was found, both model calls were traced with no changes to the calling code, and span attributes were rich enough for Phoenix to compute cost.
- What got in the way
- When the SDK version doesn't match, the instrumentor silently no-ops (it logs a warning and keeps going), so a bad dependency bump could quietly turn tracing off. I added a startup check that fails if instrumentation didn't attach. The older line also broke at runtime under a newer wrapt that its dependency metadata allowed.