splunk-ao-adk package provides native observability for Google ADK agents. It automatically traces agent runs, LLM calls, and tool executions with minimal setup.
This is the native integration for Google ADK. If you prefer using OpenTelemetry, see the OpenTelemetry-based integration.
Installation
View the package on PyPI for version history and additional details.
Quick start
The simplest way to add Splunk Agent Observability to your Google ADK application is using theSplunkAOADKPlugin. This plugin attaches to the ADK Runner and automatically captures all agent, LLM, and tool events.
- Agent execution spans
- LLM calls with input/output and token usage
- Tool executions with arguments and results
- Error handling and status codes
Configuration
The plugin can be configured via constructor parameters or environment variables:Features
Session tracking
All traces with the same ADKsession_id are automatically grouped into a Splunk Agent Observability session. This enables conversation-level tracking across multiple interactions:
Custom metadata
Attach custom metadata to traces using ADK’s nativeRunConfig.custom_metadata. Metadata is propagated to all spans (agent, LLM, tool) within the invocation:
Callback mode
For granular control over which callbacks to use, you can attach them directly to your agent instead of using the plugin. This is useful when you need to customize behavior for specific agents:Retriever spans
By default, allFunctionTool calls are logged as tool spans. To log a retriever function as a retriever span (enabling RAG quality evaluators in Splunk Agent Observability), decorate it with @splunk_ao_retriever:
Custom ingestion hook
For advanced use cases, you can intercept traces for custom processing before forwarding to Splunk Agent Observability. This is useful for:- Custom session management
- Local trace inspection and debugging
- Filtering or enriching trace data
Plugin vs Callback mode
Recommendation: Use
SplunkAOADKPlugin for most applications. Use SplunkAOADKCallback only when you need fine-grained control over individual agent callbacks.
Next steps
Splunk Agent Observability logger
Log with full control over sessions, traces, and spans using the Splunk Agent Observability logger.
OpenTelemetry integration
Use OpenTelemetry for Google ADK observability.
RAG evaluators
Learn about RAG quality evaluators for retriever spans.
Sessions
Learn how sessions group related traces together.