Skip to content

sdk-bedrock: InvokeFlow spans show the flow id as the agent name #195

Open

Description

@aikins01

Bedrock InvokeFlow spans get the agent name invoke_flow <flow id> (or invoke_flow unknown) in both SDKs.

The flow span is a type: "agent" span named invoke_flow ${flowIdentifier} (packages/bedrock/src/agent-handlers.ts flowName, sdks/python-bedrock/src/telemetry_dev_bedrock/_registry.py _flow_name) with only agentId set. An agent span without an agent name takes its span name, so the flow id, prefixed with the operation, shows as the agent in the Sessions Agent column, the usage breakdown by agent, and runaway-alert grouping. Python has done this since it added the default; TypeScript does it since #193, which made the two match. Spans named invoke_agent or invoke_agent <id> already get no name.

expected:

  • an InvokeFlow span carries no gen_ai.agent.name, or a name that is not built from the operation and the id, in both SDKs
  • the TS and Python Bedrock flow tests assert it

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions