Repository navigation
feat(bedrock): trace Amazon Bedrock Agents InvokeAgent, zero-code - #727
Merged
Merged
Conversation
…and keep the lockfile change minimal
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.
What
@traceai/bedrocknow traces Amazon Bedrock Agents (@aws-sdk/client-bedrock-agent-runtime), and@traceai/autoactivates it zero-code when that SDK is installed.InvokeAgentCommand/InvokeInlineAgentCommandproduce one AGENT span (invoke_agent <agentId>/<aliasId>, orinvoke_agent inline) withgen_ai.operation.name,gen_ai.agent.idandsession.id, covering the streamed completion. It ends when the stream is consumed, errors or is abandoned (no leaked spans).enableTrace, trace events become child spans: model invocations as LLM spans (model, messages, usage), action groups and the code interpreter as TOOL spansexecute_tool <name>, knowledge-base lookups as RETRIEVER spans, collaborators as AGENT spans, and failure traces as ERROR spans.input.value.error.typeand are rethrown unchanged.bedrock-types.tsis type-only now, so an app that installs only the agent-runtime SDK can load the package. Both SDKs are optional peers.@aws-sdk/client-bedrock-agent-runtime@3.1127.0, matching the lockedclient-bedrock-runtime) and its two importer entries; no other resolution changes.Tests
Offline, with recorded event streams through an injected request handler: plain invoke,
enableTracewith model/action-group/knowledge-base events, early stream exit, errors, hidden content (every span attribute checked for raw tool arguments), and zero-code activation through@traceai/auto.