Not on ADK? For raw LLM SDKs (OpenAI, Anthropic, Bedrock, Vertex), use
bento.track_ai. For a framework that already emits OpenTelemetry (LangChain, LlamaIndex, Pydantic AI, or a TypeScript framework like the Vercel AI SDK or Mastra), see Export from any framework. All of these mix freely in the same app.Install
[adk] extra pulls in the OpenInference tracer for ADK. The base wheel stays small.
bento.instrument()
Call this once at app startup, after bento.init(...) and before any LLM call.
"adk", or returns None when the [adk] extra is missing. Passing "adk" activates ADK by name. An unknown name raises ValueError; a missing [adk] extra logs a warning and returns None. The call is safe to repeat: a second call with the same target is a no-op, and a second call with a different target logs a warning and is ignored.
bento.shutdown() removes every active integration on the way out.
Identity at init
To stamp every captured span withuser_id, session_id, and tags without threading them through your code, pass getters to bento.init(...):
Add custom events
For ad-hoc events alongside the integration, wrap each one withbento.track_ai: a custom event before or after a model call, or an event for a step ADK doesn’t emit. The integration’s spans and your manual ones land in the same dashboard.
If you need a single trace to span multiple LLM and tool calls within one turn, see Trajectories (advanced).
Reference
See also
Manual tracking
bento.track_ai for SDKs without an integration.Configuration
init(), identity getters, env vars, lifecycle.Trajectories
Group multi-step work into one trace.
OTel transport
Wire Bento into an existing OpenTelemetry pipeline.