Problem
In `pkg/edge/proxy.go::logProxyRequest` (after #46) the service-name attribution for proxied requests still relies on a string-match cascade against the Host header:
```go
if strings.Contains(host, "bff") {
service = "bff"
} else if strings.Contains(host, "graphql") {
...
```
Two places to keep in sync — add `cargo.` to the route table and the request flows correctly but logs as `"proxy"` instead of the real service. This is the wart I flagged at the start of the original split conversation.
Fix
Add `Service string` to `ProxyRoute`. Set it in `BuildRoutesWithPorts` for every route that should attribute (skip the cloudmock-internal routes since they're already filtered out as internal traffic). `logProxyRequest` reads `route.Service` first; the host-substring cascade is preserved as a fallback for hand-rolled route tables that don't set it (backwards compat).
New test `TestBuildRoutes_ServiceLabels` pins the mapping for both `.localhost` rows and primary-domain rows, plus asserts that the internal `cloudmock.localhost` / `admin.*` rows leave `Service` blank.
PR follows.
Problem
In `pkg/edge/proxy.go::logProxyRequest` (after #46) the service-name attribution for proxied requests still relies on a string-match cascade against the Host header:
```go
if strings.Contains(host, "bff") {
service = "bff"
} else if strings.Contains(host, "graphql") {
...
```
Two places to keep in sync — add `cargo.` to the route table and the request flows correctly but logs as `"proxy"` instead of the real service. This is the wart I flagged at the start of the original split conversation.
Fix
Add `Service string` to `ProxyRoute`. Set it in `BuildRoutesWithPorts` for every route that should attribute (skip the cloudmock-internal routes since they're already filtered out as internal traffic). `logProxyRequest` reads `route.Service` first; the host-substring cascade is preserved as a fallback for hand-rolled route tables that don't set it (backwards compat).
New test `TestBuildRoutes_ServiceLabels` pins the mapping for both `.localhost` rows and primary-domain rows, plus asserts that the internal `cloudmock.localhost` / `admin.*` rows leave `Service` blank.
PR follows.