agent-substrate / agent-substrate/substrate

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

Abierto
#1,474 0 comentarios 0 reacciones 1 asignado Reclamado por @JeffLuoo Ver en GitHub
area/network area/observability bug-bash kind/bug prio/P2
Lenguaje dominante
Go
Estrellas
1.8k
Forks
316
Merge medio
2 d 43 min
PR fusionados (30 d)
287

Descripción

### 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`.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.