agent-substrate / agent-substrate/substrate

[Bug]: atenet.router.route.duration mislabels failed cold resumes as "none" and emits empty template attributes on routing failures

未关闭
#1,474 0 条评论 0 个 reaction 已指派 1 人 已被 @JeffLuoo 认领 在 GitHub 查看
area/network area/observability bug-bash kind/bug prio/P2
主要语言
Go
星标
1.8k
派生
316
平均合并
2 天 43 分钟
30 天内合并 PR
287

描述

### What happened?

During worker pool saturation, capacity exhaustion (`no_capacity`), or routing errors, `atenet.router.route.duration` mislabels all failed activations as steady-state traffic (`ate.router.resume="none"`) and emits empty strings for template dimensions (`ate.template.atespace=""`, `ate.template.name=""`)

### Expected Behavior

Failed cold activations must not be tagged with ate.router.resume="none" (which represents steady-state routes on running actors). They should preserve the cold activation intent (e.g. triggered or a dedicated failure state).

### Steps to Reproduce

1. Deploy Agent Substrate on Kubernetes with atenet-router.
2. Send an HTTP request targeting an actor that cannot be resolved or whose activation fails (e.g., worker pool scaled to 0 or nonexistent authority):
```
curl -s -H "Host: nonexistent-actor.default.ate.dev" http:///
```
3. Scrape metrics from the router pod on port 9090 (or 9096 via port-forward):
```
curl -s http://localhost:9090/metrics | grep "atenet_router_route_duration_seconds_count"
```
4. Observe emitted metric line:
```
atenet_router_route_duration_seconds_count{ate_router_outcome="not_found",ate_router_resume="none",ate_template_atespace="",ate_template_name="",otel_scope_name="atenet-router"} 1
```

### Sandbox Runtime

Both / Runtime Agnostic

### Agent Substrate Version / Commit SHA

main

### Kubernetes Version & Environment

GKE

### Host OS & Architecture

_No response_

### Relevant Logs and Diagnostic Output

```shell

```

### Additional Context

_No response_

### Confirmation

- [x] I have searched existing issues and verified that this is not a duplicate.
- [x] I have verified that this issue occurs on the latest commit on `main`.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。