Breaking Changes
instrumentationsis now a dict mapping integration name → LLM SDK module. Replaces the list-of-strings form. Example:instrumentations={"openai": openai, "anthropic": anthropic}. The caller passes the module they already imported in app code, so the patch lands on the same module instance the app actually uses. Mirrors the TypeScript SDK's object-form API for full feature parity.- The list-of-strings form (
instrumentations=["openai"]) is removed with no fallback. Anything other than a plain dict — including the old list — raisesTypeErrorat register time with a migration hint. See the README's "Migrating frominstrumentations=[\"openai\"]" section. - Unknown integration keys raise
TypeError. Previously a typo in an integration name silently no-op'd with alogging.warning. Now the bootstrap fails loudly, naming the supported keys.
Added
- New
InstrumentationNameliteral type andInstrumentationsInputalias exported fromlatitude_telemetry. - 13 additional integrations wired into the registry (the PyPI deps were already pinned in
pyproject.tomlbut the registry only registered 10):aleph_alpha,crewai,dspy,google_generativeai,groq,haystack,litellm,mistralai,ollama,replicate,sagemaker,transformers,watsonx. Each takes the corresponding user-imported module.
Removed
- The internal
INSTRUMENTATION_MAPlookup with itsmodule/class/package/manualfields, replaced by the typedIntegrationDefdataclass + a flatINTEGRATIONSdict. - Internal
__import__of the user's SDK module — the user now passes it directly.