Skip to content

feat: add agent-orchestrator instrumentation plugin - #703

Open
rangemer333-cell wants to merge 3 commits into
alibaba:mainfrom
rangemer333-cell:agent/go-agent/bf86893e
Open

feat: add agent-orchestrator instrumentation plugin#703
rangemer333-cell wants to merge 3 commits into
alibaba:mainfrom
rangemer333-cell:agent/go-agent/bf86893e

Conversation

@rangemer333-cell

Copy link
Copy Markdown
Contributor

Summary

Add observability support for the AgentWrapper/agent-orchestrator daemon (github.com/aoagents/agent-orchestrator/backend) — an agentic orchestrator that plans tasks, spawns parallel coding-agent sessions, routes CI/review feedback, and observes pull requests.

The Session Manager is the single entry point for the spawn/send lifecycle, so each of those methods becomes a gen_ai span following the ARMS semantic conventions for agentic systems:

  • (*Manager).Spawn → workflow span, gen_ai.operation.name=spawn_agent
  • (*Manager).Send → client span, gen_ai.operation.name=send_message

Both spans set gen_ai.system=agent_orchestrator and gen_ai.span.kind per the ARMS gen-ai spec. Non-standard attributes (session kind, project/issue ids, branch, session id, message length) are emitted under the gen_ai.other_input.* / gen_ai.other_output.* prefixes that the ADK plugin already uses.

The instrumented types live under the daemon's internal/ tree, which is not importable from this plugin module, so the hook declares the receiver and config parameters as interface{} and reads the fields it needs via reflection. The trampoline passes the dereferenced values, which are assignable to interface{}.

Test plan

  • pkg/rules/agent-orchestrator builds (go build ./...)
  • make lint clean (0 issues)
  • go vet ./tool/... clean
  • Integration test test/agent-orchestrator/v0.10.1 exercises Spawn + Send against a stub session_manager package mirroring the real public surface, and asserts span name, kind, and all gen_ai attributes via test/verifier

🤖 Generated with Claude Code

Add observability support for the AgentWrapper/agent-orchestrator
daemon (github.com/aoagents/agent-orchestrator/backend). The Session
Manager is the single entry point for the spawn/send lifecycle, so
each of those methods becomes a gen_ai workflow/client span following
the ARMS semantic conventions for agentic systems.

The instrumented types live under the daemon's internal/ tree, which
is not importable from this plugin module, so the hook declares the
receiver and config parameters as interface{} and reads the fields it
needs via reflection.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


observability_dev_agent seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

observability_dev_agent and others added 2 commits June 30, 2026 09:37
…gen_ai conventions

Address review feedback on PR alibaba#703:
- Send span: gen_ai.span.kind "client" -> "task" (client not in ARMS enum)
- Span names aligned with gen_ai.operation.name: "create_agent" / "send_message"
- Spawn operation.name "spawn_agent" -> "create_agent" (matches util-genai OperationCreateAgent)
- agent-orchestrator.json: add Version field "[0.10.1,)"
- Tests: add error-path coverage (empty Harness / empty SessionID) and
  assert gen_ai.other_input.issue_id / message_length

Co-authored-by: multica-agent <github@multica.ai>
…assertion

attribute.Int sets an INT64 value, so attrVal() (which calls Value.AsString())
returns "" for this attribute and the equality check fails at runtime. Use
verifier.GetAttribute(...).AsInt64() instead, matching the adk-go pattern.

Co-authored-by: multica-agent <github@multica.ai>
@NameHaibinZhang

Copy link
Copy Markdown
Collaborator

@claude fix test error

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants