agent-substrate / agent-substrate/substrate

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

Ouverte
#1,474 0 commentaires 0 réactions 1 personne assignée Réclamée par @JeffLuoo Voir sur GitHub
area/network area/observability bug-bash kind/bug prio/P2
Langage dominant
Go
Étoiles
1.8k
Forks
316
Merge moyen
2 j 43 min
PR mergées (30 j)
287

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.