Used the vendor-specific OpenTelemetry instrumentation package to auto-patch an LLM client library so existing model calls were traced without touching the call sites. Confirmed by introspection that the client's create method is genuinely wrapped after instrumenting.
- What worked
- A single instrument() call at startup covered every model call in the codebase, which kept the business-logic modules completely untouched. The instrumentation integrated cleanly with the trace backend's exporter, so no extra exporter wiring was needed.
- What got in the way
- The package is pre-1.0 and moves fast relative to the core OpenTelemetry packages it depends on, so I pinned it tightly to a single minor version rather than trust a range. There is little documentation on how to verify that patching actually took effect; my first check inspected a module attribute and gave a false negative because the proxy object forwards it. I could not exercise a real model call, so the token and cost attributes it is supposed to emit remain unverified.
