Repository navigation
Conversation
A small travel agent with two mock tools, built on the OpenAI Agents SDK and instrumented with Splunk AO. It shows two ways to send telemetry: the SplunkAOTracingProcessor registered through set_trace_processors(), and the community OpenTelemetry instrumentation with a Splunk AO span processor. Includes a placeholder-only .env.example, requirements.txt and a README. Co-Authored-By: Claude Code <noreply@anthropic.com>
Replace the Azure-specific client with AsyncOpenAI, which reads OPENAI_API_KEY and an optional OPENAI_BASE_URL, so the example runs against OpenAI or any OpenAI-compatible endpoint. In otel mode, disable the Agents SDK's default export to OpenAI's tracing backend so telemetry goes only to Splunk AO. Co-Authored-By: Claude Code <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
examples/agent/openai-agents-sdk/, a small travel agent built on the OpenAI Agents SDK and instrumented with Splunk AO. The agent has two mock tools (flight search and activity search), so each run produces a tool-calling turn followed by a final answer.The example shows two ways to send the same agent's telemetry to Splunk AO, selected with
INSTRUMENTATION:sdk(default):SplunkAOTracingProcessor, registered with the Agents SDK'sset_trace_processors()hook.otel: the community OpenTelemetry instrumentation for the Agents SDK, with Splunk AO attached throughadd_splunk_ao_span_processor(). This mode disables the Agents SDK's default export to OpenAI's tracing backend, so telemetry goes only to Splunk AO.The model client is the standard
AsyncOpenAI, so the example works with OpenAI or any OpenAI-compatible endpoint (setOPENAI_BASE_URL).What is included
main.py.env.examplewith placeholder values onlyrequirements.txt(splunk-ao[openai]>=0.5.0,python-dotenv, and the OTel package as an optional line)README.mdNo credentials,
.env,uv.lock, oruv.tomlare included.Test plan
requirements.txtresolves from public PyPI in a clean virtual environmentmain.pycompilesINSTRUMENTATION=sdkagainst a Splunk AO backendINSTRUMENTATION=otel, including confirming no request reachesapi.openai.comruff checkonmain.pyOpened as a draft until the end-to-end runs are done.
🤖 Generated with Claude Code