Skip to content

[bug-bash] atenet-egress exports traces and metrics as service.name=atenet-router #3308

Closed

Description

@JeffLuoo

What happened?

atenet-egress exports its traces and metrics with service.name=atenet-router, so on the backend the egress gateway is indistinguishable from the ingress router.

cmd/atenet/internal/router/router.go initializes tracing (L144) and metrics (L152) with extproc.ServiceName, a constant "atenet-router" (cmd/atenet/internal/router/extproc/metrics.go:36). The egress deployment runs the same code path, so it inherits that name. This is a follow-up to #1459, which wired egress to the collector but left its identity as the router's.

Observed on GKE with the managed OTel collector (Cloud Monitoring / Cloud Trace):

  • Metrics: target_info{job="atenet-router"} returns two series, one per pod: k8s.pod.name=atenet-egress-… and k8s.pod.name=atenet-router-…. target_info{job="atenet-egress"} returns nothing.
  • Traces: Cloud Trace filtered on k8s.pod.name:atenet-egress returns substrate.ateapi.v1.Control/ListActors spans with service.name=atenet-router.

Impact:

  • Cloud Trace's service view and any job/service.name-based query merge egress and ingress.
  • Egress-emitted router instruments (e.g. atenet.router.route.duration with ate.router.outcome="denied" from the egress path, atenet: classify a 403 route outcome as denied, not resume_error #2534) cannot be told apart from ingress by service. Only k8s.pod.name / top_level_controller_name separate them.
  • docs/observability.md does not list egress as an emitter in the metrics table.

What did you expect to happen?

The egress deployment reports service.name=atenet-egress (and job=atenet-egress in GMP) on traces, metrics, and logs.

How can we reproduce it?

  1. Deploy main on GKE with the managed OTel collector (go run ./cmd/ate-setup deploy ate-system).
  2. Wait one export interval, then query GMP:
    target_info{job="atenet-router"}
    
    Two series appear, one with k8s.pod.name=atenet-egress-….
  3. In Cloud Trace, filter k8s.pod.name:atenet-egress. The spans carry service.name=atenet-router.

Anything else we need to know?

Likely fix: pass the service name into router.Run (or derive it from a flag the egress manifest sets) instead of the shared extproc.ServiceName constant. Check the tracer/meter names in ingress/*.go too.

Version

substrate main@ffed8551, GKE 1.36.4, envoy dataplane.

Activity

  1. added 5 commits that reference this issue on Oct 29, 2026
    4de91dd
    ff1453f
    76ec734
    87db6ff
    d9cd1b5
  2. added a commit that references this issue on Oct 31, 2026
    0f7ebfa
  3. added a commit that references this issue on Nov 2, 2026
    5ad04ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions