agent-substrate / agent-substrate/substrate

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

Offen
#1,474 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @JeffLuoo Auf GitHub ansehen
area/network area/observability bug-bash kind/bug prio/P2
Vorherrschende Sprache
Go
Sterne
1.8k
Forks
316
Ø Merge
2 T. 43 Min.
Gemergte PRs (30 T.)
287

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.