AWS Bedrock/Strands Instrumentation#257
Open
JWinermaSplunk wants to merge 9 commits intosignalfx:mainfrom
Open
AWS Bedrock/Strands Instrumentation#257JWinermaSplunk wants to merge 9 commits intosignalfx:mainfrom
JWinermaSplunk wants to merge 9 commits intosignalfx:mainfrom
Conversation
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.
Comparison: Upstream Bedrock Instrumentation vs. Strands Instrumentation
Architecture & Approach
Upstream Bedrock Instrumentation (
opentelemetry-instrumentation-botocore):InvokeModel,Converse,InvokeAgent, etc.)Strands Instrumentation (
splunk-otel-instrumentation-strands):BeforeModelCallEvent,AfterModelCallEvent,BeforeToolCallEvent,AfterToolCallEvent) for LLM and tool call telemetryAgent.__init__,Agent.invoke_async) and AgentCore component methodsAgentInvocation,LLMInvocation,ToolCall,RetrievalInvocation,Workflow)What Each Captures
Upstream Bedrock:
bedrock-runtime.InvokeModel,bedrock-runtime.Converse, etc.)Strands Instrumentation:
toolUseId, structured JSON arguments, resultretrieve_memories→RetrievalInvocation(query,top_k, documents retrieved count)create_event,create_blob_event,list_events→ToolCallspansBedrockAgentCoreAppentrypoint: rootWorkflowspan per request (sync and async)Not captured (not available in current SDK):
bedrock-agentcorepackageOTEL_INSTRUMENTATION_STRANDS_SUPPRESS_BUILTIN_TRACER=true)Span Hierarchy
Key Differences
aws.bedrockaws.bedrock(LLM),strands(agent/tool)HookProvider+ wraptbotocore/boto3strands-agents >= 1.0.0;bedrock-agentcoreoptionalsplunk-otel-util-genai Types in Use
WorkflowBedrockAgentCoreApp.entrypoint— top-level request boundarystart_workflow,stop_workflow,fail_workflowAgentInvocationAgent.invoke_async— full agent execution including input/output messages, model, toolsstart_agent,stop_agent,fail_agentLLMInvocationstart_llm,stop_llm,fail_llmToolCallstart_tool_call,stop_tool_call,fail_tool_callRetrievalInvocationMemoryClient.retrieve_memories— query, retriever type,top_k, documents retrievedstart_retrieval,stop_retrieval,fail_retrievalErrortype(exception class name) andmessagefail_*methodsInputMessageAgentInvocation.input_messagesandLLMInvocationOutputMessageAgentInvocation.output_messagesandLLMInvocationTextInputMessage/OutputMessageExample Telemetry
https://app.us1.signalfx.com/#/apm/traces/8a25fbfade5f5ced3404e4dac4eac2dc