You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if settings.a2a_metrics_enabled:
registry.counter("a2a_stream_requests_total").inc()
registry.gauge("a2a_stream_active").add(+1/-1)
expose GET /metrics
else:
keep existing debug metric logs only
🔍 发现的问题 / 原始需求描述
metrics export和trace context应拆成两个 issue;本 issue 仅聚焦可选 metrics export。🛠️ 详细实施方案
src/opencode_a2a/config.pysrc/opencode_a2a/server/application.pysrc/opencode_a2a/execution/executor.pysrc/opencode_a2a/execution/stream_runtime.pydocs/guide.mdtests/server/test_app_behaviors.pytests/execution/test_metrics.pyA2A_METRICS_ENABLED=true|false,在开启时暴露/metrics或等价 scrape endpoint。🧪 回归测试建议
/metrics开启/关闭两种配置下的接口测试。./scripts/doctor.sh。