observability-debugging-contract

Define an end-to-end observability and debugging contract for AgentHub runs.

Updated May 19, 2026
One-click install
npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill observability-debugging-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: observability-debugging-contract
Source: https://github.com/zxc1a1a1/Multi_Agent-AgentHub/tree/main/.agents/skills/observability-debugging-contract
Command: npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill observability-debugging-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

为 AgentHub 定义从前端入口到 Gateway、Orchestrator、子 Agent、LLM Provider、Artifact 与 Tool Call 的全链路可观测性与排障契约,确保任何一次 Run 都能用统一关联 ID 和结构化数据快速定位问题原因,同时严格脱敏避免泄漏敏感信息。

Core Features & Use Cases

  • Trace Context & ID 关联:规定 traceparent/tracestate 的跨服务传播与 traceId + requestId + runId 的统一串联规则,覆盖 run/plan/step/agentTask/artifact/toolCall/llmRequest 等关联。
  • 结构化日志标准:要求后端服务输出 JSON 结构化日志,规定稳定 event dot.case 命名、基础字段集合与安全错误展示字段(errorCodesafeMessagedurationMs)。
  • Span 命名与属性规范:定义推荐 span 名称与 agenthub.* 前缀的自定义属性边界,避免将 prompt/token/用户隐私写入 span attributes。
  • Metrics 与错误分类:给出覆盖延迟/流量/错误/饱和度的指标命名与低基数维度要求,并提供稳定错误码分域与用户可见错误策略。
  • 脱敏与 Debug Dump:定义日志/trace/metrics/debug dump 的禁止与允许字段,提供可控脱敏的 debug dump 快照范围与关闭策略。
  • 分进程与多 Agent 排障路径:明确 Gateway↔Orchestrator 分进程关键事件/字段,支持 2+ Agent、ordered_parallel、fallback、群聊消息关联排障。

Quick Start

Use the observability-debugging-contract skill to standardize your AgentHub run tracing, JSON logging, metrics, error codes, and redacted debug dumps so that Gateway-to-Orchestrator and multi-agent failures can be diagnosed quickly without exposing tokens or prompts.

Frequently Asked Questions about observability-debugging-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I correlate distributed tracing across a multi-agent run?

Correlate distributed tracing across a multi-agent run by propagating traceparent and tracestate context, linking all events with stable traceId, requestId, and runId identifiers from Gateway to child agents.

What is the standard for structured logging in multi-agent Orchestrator systems?

Structured logging in multi-agent Orchestrator systems requires JSON output with stable dot.case event names, base field sets, and safe error display fields like errorCode, safeMessage, and durationMs.

How to prevent sensitive prompt data from leaking into span attributes?

Prevent sensitive prompt data from leaking into span attributes by enforcing strict redaction rules that forbid writing prompts, tokens, or user privacy data, using only agenthub.* prefixed custom attributes.

Does this observability contract support group-chat and fallback streaming flows?

Yes, this observability contract supports group-chat, ordered_parallel, and fallback streaming flows by defining Gateway-to-Orchestrator key events and multi-agent message correlation for precise debugging.

What is the best way to debug multi-agent failures without exposing tokens?

Debug multi-agent failures without exposing tokens by using controllable debug dump snapshots that define allowed and forbidden fields, ensuring strict redaction across logs, traces, and metrics.

How do I define metrics and error taxonomy for LLM provider calls?

Define metrics and error taxonomy for LLM provider calls by establishing latency, traffic, error, and saturation指标 with low-cardinality dimensions, mapping stable error codes to user-visible safe messages.