From 0435fec10adb28a94bac5b604ff9b15d0b00e82e Mon Sep 17 00:00:00 2001 From: Julien Gautier Date: Sat, 16 May 2026 03:36:40 +0200 Subject: [PATCH] feat(portal-admin): jaeger deep link on trace_id + actor-pivot on actor_id_hash (#166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Turns the audit-log table's `trace_id` and `actor_id_hash` columns from inert text into the two pivots an investigator actually needs: - **trace_id** → Jaeger deep link (opens in a new tab). Closes the "join audit + traces by trace_id" loop from [ADR-0012](docs/decisions/0012-observability-pino-opentelemetry.md) / [ADR-0013](docs/decisions/0013-audit-trail-separated-postgres-append-only.md) without any new BFF surface. - **actor_id_hash** → click to refilter the table on that single actor. "Show me everything else this user did" stays in the page; no copy-paste loop. ## What lands ### Trace-id deep link to Jaeger [`audit.html`](apps/portal-admin/src/app/pages/audit/audit.html#L162-L173) — the cell becomes an `` pointing at `${environment.jaegerBaseUrl}/trace/`. Anonymous events (`traceId === null`) keep the dash placeholder. [`environment.ts`](apps/portal-admin/src/environments/environment.ts) gains `jaegerBaseUrl`. Dev defaults to `http://localhost:16686` (matches the compose `observability` profile from `infra/local/dev.compose.yml`). Per-env replacement picks up whatever trace backend the future infrastructure ADR settles on — Tempo, Grafana Cloud, on-prem Jaeger; the SPA-side wiring doesn't care. ### Actor-pivot click [`audit.html`](apps/portal-admin/src/app/pages/audit/audit.html#L146-L160) — non-null `actorIdHash` becomes a ` + } @else { +
(anonymous)
+ } @if (event.subject; as subject) {
{{ subject }}
} - {{ event.traceId ?? '—' }} + + @if (event.traceId; as traceId) { +
{{ traceId }} + } @else { — } + @if (event.payload) {
diff --git a/apps/portal-admin/src/app/pages/audit/audit.scss b/apps/portal-admin/src/app/pages/audit/audit.scss index 8b9d8ff..f3fcd65 100644 --- a/apps/portal-admin/src/app/pages/audit/audit.scss +++ b/apps/portal-admin/src/app/pages/audit/audit.scss @@ -273,6 +273,65 @@ color: #9ca3af; } +// The clickable variant of `.actor-hash` (rendered as a