SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
test(trace-details): add E2E coverage for Trace Details (#11846)
Aditya Singha22e7b7b169d
diff --git a/frontend/src/pages/TraceDetailsV3/SpanDetailsPanel/AnalyticsPanel/AnalyticsPanel.tsx b/frontend/src/pages/TraceDetailsV3/SpanDetailsPanel/AnalyticsPanel/AnalyticsPanel.tsxindex 4f9f3cadd4..e2d6b7e50a 100644--- a/frontend/src/pages/TraceDetailsV3/SpanDetailsPanel/AnalyticsPanel/AnalyticsPanel.tsx+++ b/frontend/src/pages/TraceDetailsV3/SpanDetailsPanel/AnalyticsPanel/AnalyticsPanel.tsx@@ -148,7 +148,7 @@ function AnalyticsPanel({className="floating-panel__drag-handle"/>- <div className={styles.body}>+ <div className={styles.body} data-testid="trace-analytics-panel"><TabsRoot defaultValue="exec-time" onValueChange={onTabChange}><TabsList variant="secondary"><TabsTrigger value="exec-time" variant="secondary">diff --git a/frontend/src/pages/TraceDetailsV3/SpanDetailsPanel/DockModeSwitcher.tsx b/frontend/src/pages/TraceDetailsV3/SpanDetailsPanel/DockModeSwitcher.tsxindex 017474405c..7523c69ade 100644--- a/frontend/src/pages/TraceDetailsV3/SpanDetailsPanel/DockModeSwitcher.tsx+++ b/frontend/src/pages/TraceDetailsV3/SpanDetailsPanel/DockModeSwitcher.tsx@@ -60,7 +60,7 @@ function DockModeSwitcher({{DOCK_OPTIONS.map((option) => (<TooltipRoot key={option.value}><TooltipTrigger asChild>- <span>+ <span data-testid={`dock-mode-${option.value}`}><ToggleGroupItem value={option.value}>{option.icon}</ToggleGroupItem></span></TooltipTrigger>diff --git a/frontend/src/pages/TraceDetailsV3/SpanHoverCard/SpanHoverCard.tsx b/frontend/src/pages/TraceDetailsV3/SpanHoverCard/SpanHoverCard.tsxindex 163b473271..1bfae87e0f 100644--- a/frontend/src/pages/TraceDetailsV3/SpanHoverCard/SpanHoverCard.tsx+++ b/frontend/src/pages/TraceDetailsV3/SpanHoverCard/SpanHoverCard.tsx@@ -64,7 +64,11 @@ export function SpanTooltipContent({{previewRows && previewRows.length > 0 && (<div className={styles.preview}>{previewRows.map((row) => (- <div key={row.key} className={styles.row}>+ <div+ key={row.key}+ className={styles.row}+ data-testid={`span-hover-card-preview-${row.key}`}+ ><span className={styles.previewKey}>{row.key}:</span>{' '}<span className={styles.previewValue}>{row.value}</span></div>diff --git a/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/FlamegraphCanvas.tsx b/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/FlamegraphCanvas.tsxindex a1fb960633..a42d090678 100644--- a/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/FlamegraphCanvas.tsx+++ b/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/FlamegraphCanvas.tsx@@ -12,6 +12,7 @@ import { useFlamegraphCrosshair } from './hooks/useFlamegraphCrosshair';import { useFlamegraphDrag } from './hooks/useFlamegraphDrag';import { useFlamegraphDraw } from './hooks/useFlamegraphDraw';import { useFlamegraphHover } from './hooks/useFlamegraphHover';+import { useFlamegraphTestHook } from './hooks/useFlamegraphTestHook';import { useFlamegraphZoom } from './hooks/useFlamegraphZoom';import { useScrollToSpan } from './hooks/useScrollToSpan';import { EventRect, FlamegraphCanvasProps, SpanRect } from './types';@@ -159,6 +160,14 @@ function FlamegraphCanvas(props: FlamegraphCanvasProps): JSX.Element {useCanvasSetup(canvasRef, containerRef, drawFlamegraph, overlayCanvasRef);+ // E2E-only: expose the live span→rect map so specs can target canvas bars.+ // No-op unless window.__SIGNOZ_E2E__ is set (Playwright addInitScript).+ useFlamegraphTestHook({+ canvasRef,+ containerRef,+ spanRectsRef,+ });+const {cursorXPercent,cursorX,diff --git a/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/hooks/useFlamegraphTestHook.ts b/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/hooks/useFlamegraphTestHook.tsnew file mode 100644index 0000000000..0010d25661--- /dev/null+++ b/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/hooks/useFlamegraphTestHook.ts@@ -0,0 +1,101 @@+import { MutableRefObject, useEffect } from 'react';++import { SpanRect } from '../types';++/**+ * E2E test hook for the canvas flamegraph. The flamegraph is `<canvas>`, so+ * individual bars have no DOM nodes to target — but `spanRectsRef` already+ * holds the live span→rectangle map (CSS pixels) used for hit-testing. This+ * exposes a thin, read-only view of it on `window.__sigTraceFlame__` so a+ * Playwright spec can resolve a span's on-screen point and drive real+ * hover/click events at it (see tests/e2e/helpers/trace-details.ts).+ *+ * Gated on `window.__SIGNOZ_E2E__` (set by Playwright via addInitScript), so+ * nothing is attached in normal runtime — the e2e build is a production build,+ * so this must be a RUNTIME flag, not a NODE_ENV/mode check.+ */++interface Point {+ x: number;+ y: number;+}++interface FlamegraphTestApi {+ getSpanPoint: (spanId: string) => Point | null;+ isSpanInView: (spanId: string) => boolean;+ // Resting group color of a span's bar — changes when colour-by changes.+ getSpanColor: (spanId: string) => string | null;+}++declare global {+ interface Window {+ __SIGNOZ_E2E__?: boolean;+ __sigTraceFlame__?: FlamegraphTestApi;+ }+}++// Inverse of `getCanvasPointer` in useFlamegraphHover: a CSS-space span rect+// maps back to a viewport point at the bar's center.+function rectToViewportCenter(canvas: HTMLCanvasElement, r: SpanRect): Point {+ const box = canvas.getBoundingClientRect();+ const dpr = window.devicePixelRatio || 1;+ const cssWidth = canvas.width / dpr;+ const cssHeight = canvas.height / dpr;+ const cssX = r.x + r.width / 2;+ const cssY = r.y + r.height / 2;+ return {+ x: box.left + cssX * (box.width / cssWidth),+ y: box.top + cssY * (box.height / cssHeight),+ };+}++interface UseFlamegraphTestHookParams {+ canvasRef: MutableRefObject<HTMLCanvasElement | null>;+ containerRef: MutableRefObject<HTMLDivElement | null>;+ spanRectsRef: MutableRefObject<SpanRect[]>;+}++export function useFlamegraphTestHook({+ canvasRef,+ containerRef,+ spanRectsRef,+}: UseFlamegraphTestHookParams): void {+ useEffect(() => {+ if (!window.__SIGNOZ_E2E__) {+ return undefined;+ }++ // Reads `.current` at call time, so it always reflects the latest draw.+ const findRect = (spanId: string): SpanRect | undefined =>+ spanRectsRef.current.find((r) => r.span.spanId === spanId);++ window.__sigTraceFlame__ = {+ getSpanPoint: (spanId): Point | null => {+ const canvas = canvasRef.current;+ const rect = findRect(spanId);+ return canvas && rect ? rectToViewportCenter(canvas, rect) : null;+ },+ isSpanInView: (spanId): boolean => {+ const canvas = canvasRef.current;+ const container = containerRef.current;+ const rect = findRect(spanId);+ if (!canvas || !container || !rect) {+ return false;+ }+ const pt = rectToViewportCenter(canvas, rect);+ const box = container.getBoundingClientRect();+ return (+ pt.x >= box.left &&+ pt.x <= box.right &&+ pt.y >= box.top &&+ pt.y <= box.bottom+ );+ },+ getSpanColor: (spanId): string | null => findRect(spanId)?.color ?? null,+ };++ return (): void => {+ delete window.__sigTraceFlame__;+ };+ }, [canvasRef, containerRef, spanRectsRef]);+}diff --git a/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/types.ts b/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/types.tsindex 4c8ae56089..a39368b686 100644--- a/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/types.ts+++ b/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/types.ts@@ -28,6 +28,9 @@ export interface SpanRect {width: number;height: number;level: number;+ // Resting fill color for the current colour-by grouping. Optional: only the+ // draw path sets it; consumers (e.g. the e2e colour-by hook) read it.+ color?: string;}export interface EventRect {diff --git a/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/utils.ts b/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/utils.tsindex 719153cd84..b749e6d226 100644--- a/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/utils.ts+++ b/frontend/src/pages/TraceDetailsV3/TraceFlamegraph/utils.ts@@ -279,6 +279,9 @@ export function drawSpanBar(args: DrawSpanBarArgs): void {width,height: metrics.SPAN_BAR_HEIGHT,level: levelIndex,+ // Resting group color (selected/hovered bars override the fill, but this+ // still reflects the colour-by grouping — used by the e2e colour-by hook).+ color: isDarkMode ? color : colorDark,});span.event?.forEach((event) => {diff --git a/frontend/src/pages/TraceDetailsV3/TraceWaterfall/TraceWaterfallStates/Success/Filters/Filters.tsx b/frontend/src/pages/TraceDetailsV3/TraceWaterfall/TraceWaterfallStates/Success/Filters/Filters.tsxindex 17699e7a94..4a79edb1fe 100644--- a/frontend/src/pages/TraceDetailsV3/TraceWaterfall/TraceWaterfallStates/Success/Filters/Filters.tsx+++ b/frontend/src/pages/TraceDetailsV3/TraceWaterfall/TraceWaterfallStates/Success/Filters/Filters.tsx@@ -259,7 +259,10 @@ function Filters({);const highlightErrorsToggle = (- <div className={styles.highlightErrorsToggle}>+ <div+ className={styles.highlightErrorsToggle}+ data-testid="highlight-errors-toggle"+ ><Typography.Text>Highlight errors</Typography.Text><Switchcolor="cherry"diff --git a/frontend/src/pages/TraceDetailsV3/TraceWaterfall/TraceWaterfallStates/Success/Success.tsx b/frontend/src/pages/TraceDetailsV3/TraceWaterfall/TraceWaterfallStates/Success/Success.tsxindex b6bc411fa7..e2f03f66d4 100644--- a/frontend/src/pages/TraceDetailsV3/TraceWaterfall/TraceWaterfallStates/Success/Success.tsx+++ b/frontend/src/pages/TraceDetailsV3/TraceWaterfall/TraceWaterfallStates/Success/Success.tsx@@ -246,6 +246,19 @@ const SpanOverview = memo(function SpanOverview({onAddSpanToFunnel(span);};+ // e2e hook: expose the filter highlight/dim state as a stable attribute, since+ // the styles.* classes are hashed at build time and can't be asserted.+ let spanState = 'default';+ if (isHighlighted) {+ spanState = 'highlighted';+ } else if (isDimmed) {+ spanState = 'dimmed';+ } else if (isSelectedNonMatching) {+ spanState = 'selected-non-matching';+ } else if (isSelected) {+ spanState = 'selected';+ }+return (<divclassName={cx(styles.spanOverview, {@@ -254,6 +267,7 @@ const SpanOverview = memo(function SpanOverview({[styles.isSelectedNonMatching]: isSelectedNonMatching,[styles.isDimmed]: isDimmed,})}+ data-span-state={spanState}onClick={(): void => handleSpanClick(span)}onMouseEnter={(): void => onHoverEnter(span.span_id)}onMouseLeave={(): void => onHoverLeave()}@@ -301,6 +315,7 @@ const SpanOverview = memo(function SpanOverview({{span.has_children && (<spanclassName={styles.treeArrow}+ data-testid={`cell-collapse-${span.span_id}`}onClick={(event): void => {event.stopPropagation();event.preventDefault();diff --git a/tests/e2e/helpers/common.ts b/tests/e2e/helpers/common.tsnew file mode 100644index 0000000000..839d78eced--- /dev/null+++ b/tests/e2e/helpers/common.ts@@ -0,0 +1,37 @@+import type { Page } from '@playwright/test';++// Shared helpers used across feature-specific helper modules (dashboards,+// trace-details, …). Keep this to genuinely cross-feature utilities.++// ─── Seeder ────────────────────────────────────────────────────────────────++// Base URL of the HTTP seeder container the pytest harness brings up (exposes+// POST/DELETE on /telemetry/{traces,logs,metrics}). Written to+// `tests/e2e/.env.local` as `SIGNOZ_E2E_SEEDER_URL` and read here from the env.+export function seederUrl(): string {+ const url = process.env.SIGNOZ_E2E_SEEDER_URL;+ if (!url) {+ throw new Error(+ 'SIGNOZ_E2E_SEEDER_URL not set — pytest test_setup must be running.',+ );+ }+ return url;+}++// ─── Auth ────────────────────────────────────────────────────────────────++// Read the app JWT from the context's stored auth state. No navigation needed:+// the auth fixture loads the admin storageState (localStorage AUTH_TOKEN) into+// the context at creation, so storageState() returns it regardless of the page's+// current URL. Server-side APIs need this as a Bearer token (auth is+// JWT-in-localStorage, not cookies, so request.* doesn't carry it automatically).+export async function authToken(page: Page): Promise<string> {+ const state = await page.context().storageState();+ for (const origin of state.origins) {+ const entry = origin.localStorage.find((e) => e.name === 'AUTH_TOKEN');+ if (entry) {+ return entry.value;+ }+ }+ throw new Error('AUTH_TOKEN not found in storage state — is the page authed?');+}diff --git a/tests/e2e/helpers/trace-details.ts b/tests/e2e/helpers/trace-details.tsnew file mode 100644index 0000000000..aef9024e05--- /dev/null+++ b/tests/e2e/helpers/trace-details.ts@@ -0,0 +1,405 @@+import { randomBytes } from 'crypto';++import type { APIRequestContext, Page } from '@playwright/test';++import largeTraceRecords from '../testdata/traces/large-trace.json';+import { authToken, seederUrl } from './common';++// ── Seeder: insert traces via POST /telemetry/traces ─────────────────────────++// Shape accepted by the seeder's POST /telemetry/traces endpoint+// (mirrors `Traces.from_dict` in tests/fixtures/traces.py). One object per span;+// spans sharing a `trace_id` form one trace, linked into a tree via+// `parent_span_id`. NOTE: the endpoint does NOT ingest span events/links.+export interface SeederSpan {+ timestamp: string; // ISO-8601, e.g. new Date().toISOString()+ trace_id: string; // 32 hex chars+ span_id: string; // 16 hex chars+ parent_span_id?: string; // empty/omitted = root span+ name?: string;+ kind?: number; // 1=internal 2=server 3=client 4=producer 5=consumer+ status_code?: number; // 0=unset 1=ok 2=error+ status_message?: string;+ duration?: string; // ISO-8601 duration, e.g. "PT0.12S" (default PT1S)+ resources?: Record<string, string>; // include 'service.name'+ attributes?: Record<string, unknown>;+}++// 16-byte trace id / 8-byte span id, matching tests/fixtures/traces.py.+export const randomTraceId = (): string => randomBytes(16).toString('hex');+export const randomSpanId = (): string => randomBytes(8).toString('hex');++// Insert spans into the backend via the seeder. No auth needed (direct seeder+// call), so any APIRequestContext works — `page.request` or a standalone+// `playwright.request.newContext()` (cheaper than a full browser page for a+// pure API call).+//+// The seeder shares a single ClickHouse client, so concurrent POSTs from+// parallel workers collide with a 500 "concurrent queries within the same+// session". That's transient, so retry with backoff; any other error is real.+export async function seedTracesViaSeeder(+ request: APIRequestContext,+ spans: SeederSpan[],+): Promise<void> {+ const url = `${seederUrl()}/telemetry/traces`;+ const maxAttempts = 6;+ let lastStatus = 0;+ let lastText = '';+ for (let attempt = 0; attempt < maxAttempts; attempt += 1) {+ // eslint-disable-next-line no-await-in-loop+ const res = await request.post(url, {+ data: spans,+ headers: { 'Content-Type': 'application/json' },+ });+ if (res.ok()) {+ return;+ }+ lastStatus = res.status();+ // eslint-disable-next-line no-await-in-loop+ lastText = await res.text();+ if (!(lastStatus === 500 && lastText.includes('concurrent'))) {+ break;+ }+ // eslint-disable-next-line no-await-in-loop+ await new Promise((resolve) => {+ setTimeout(resolve, 150 * (attempt + 1) + Math.floor(Math.random() * 100));+ });+ }+ throw new Error(`seeder POST /telemetry/traces ${lastStatus}: ${lastText}`);+}++// ── Navigation ───────────────────────────────────────────────────────────────++// Pages that already had the e2e test-hook init script registered, so+// gotoTraceUntilLoaded adds it at most once per Page (addInitScript re-runs on+// every navigation, and the script would otherwise stack up across calls).+const e2eHookRegistered = new WeakSet<Page>();++// Open a seeded trace and wait until the waterfall has rendered. The trace page+// fetches once on load, so if the seed isn't query-able yet (ClickHouse lag, worse+// under parallel load) it lands on the NoData state and never refetches — this+// reloads until the given row testid appears. Makes seeded-trace specs+// deterministic in the full parallel run, not just when run alone.+export async function gotoTraceUntilLoaded(+ page: Page,+ url: string,+ readyTestId: string,+ { attempts = 5, perAttemptTimeoutMs = 8000 } = {},+): Promise<void> {+ // Enable e2e-only test hooks (e.g. the flamegraph span→rect map in+ // useFlamegraphTestHook) before the first navigation. Registered here because+ // every trace-detail spec loads the page through this helper, so the flag is+ // set without a dedicated fixture. Guarded to once per Page — addInitScript+ // re-runs on every navigation, so re-registering would stack duplicates.+ if (!e2eHookRegistered.has(page)) {+ await page.addInitScript(() => {+ (window as unknown as { __SIGNOZ_E2E__?: boolean }).__SIGNOZ_E2E__ = true;+ });+ // Dock the left nav so it doesn't fly out on hover and overlay the trace+ // content's left strip (which otherwise makes left-edge hover/click targets+ // land on the sidebar). Once per Page, before the first navigation.+ await pinSidenav(page);+ e2eHookRegistered.add(page);+ }++ for (let i = 0; i < attempts; i += 1) {+ // eslint-disable-next-line no-await-in-loop+ await page.goto(url);+ try {+ // eslint-disable-next-line no-await-in-loop+ await page+ .getByTestId(readyTestId)+ .waitFor({ state: 'visible', timeout: perAttemptTimeoutMs });+ return;+ } catch {+ // not loaded yet (NoData / seed lag) — reload and retry+ }+ }+ // final navigation so the test's own assertion surfaces a clear failure+ await page.goto(url);+}++// ── Trace options menu ─────────────────────────────────────────────────────++// Change the colour-by field via the trace options menu (Trace options → Colour+// by → field). colour-by is a per-user preference that persists, so tests should+// set a known field explicitly rather than assume the default. `fieldName` is a+// COLOR_BY_OPTIONS label (service.name | service.namespace | host.name |+// k8s.node.name | k8s.container.name); exact match avoids service.name matching+// service.namespace.+export async function changeColourByViaMenu(+ page: Page,+ fieldName: string,+): Promise<void> {+ await page.getByRole('button', { name: 'Trace options' }).click();+ await page.getByRole('menuitem', { name: /colour by/i }).click();+ await page+ .getByRole('menuitemradio', { name: fieldName, exact: true })+ .click();+}++// ── Large trace fixture (tests/e2e/testdata/traces/large-trace.json) ─────────+// One deep, realistic trace: 100 spans across 18 services, nested ~34 levels,+// 8 error spans, a wide duration spread, and db/http/llm/messaging attributes —+// enough to drive the flamegraph, waterfall, filters and drawer off one seed.+// Converted once from a real getWaterfallV4 capture. `loadLargeTrace()` stamps+// fresh ids per run (parallel isolation), rebases the timeline to ~now, and+// derives landmark span ids so specs target rows without hardcoding ids.++// Shape of each record in large-trace.json.+interface LargeTraceRecord {+ span_id: string;+ parent_span_id: string; // empty = root+ name: string;+ kind: number;+ status_code: number;+ duration: string; // ISO-8601, e.g. "PT0.080000S"+ offset_ms: number; // start offset from the root span+ resources: Record<string, string>;+ attributes: Record<string, unknown>;+}++const LARGE_TRACE_RECORDS = largeTraceRecords as LargeTraceRecord[];++export interface LargeTrace {+ traceId: string;+ spans: SeederSpan[];+ // landmark span ids — already stamped — for targeting rows / the drawer+ landmarks: {+ root: string;+ errors: string[];+ db: string;+ http: string;+ llm: string;+ messaging: string;+ deepLeaf: string;+ };+}++// Depth of a record via its parent chain (the JSON doesn't store level).+function recordDepth(+ rec: LargeTraceRecord,+ byId: Map<string, LargeTraceRecord>,+): number {+ let depth = 0;+ let cur: LargeTraceRecord | undefined = rec;+ while (cur && cur.parent_span_id) {+ cur = byId.get(cur.parent_span_id);+ depth += 1;+ }+ return depth;+}++// Build a seedable copy of the large trace with fresh, isolated ids.+export function loadLargeTrace(): LargeTrace {+ const traceId = randomTraceId();+ // Stamp a fresh span id for every original id, preserving the tree links.+ const idMap = new Map<string, string>();+ LARGE_TRACE_RECORDS.forEach((r) => idMap.set(r.span_id, randomSpanId()));++ // Sit the whole trace ~1 min in the past so all timestamps stay <= now.+ const baseStartMs = Date.now() - 60_000;++ const spans: SeederSpan[] = LARGE_TRACE_RECORDS.map((r) => {+ const span: SeederSpan = {+ timestamp: new Date(baseStartMs + r.offset_ms).toISOString(),+ trace_id: traceId,+ span_id: idMap.get(r.span_id) as string,+ name: r.name,+ kind: r.kind,+ status_code: r.status_code,+ duration: r.duration,+ resources: r.resources,+ attributes: r.attributes,+ };+ if (r.parent_span_id) {+ span.parent_span_id = idMap.get(r.parent_span_id);+ }+ return span;+ });++ const byId = new Map(LARGE_TRACE_RECORDS.map((r) => [r.span_id, r]));+ const stamp = (r: LargeTraceRecord | undefined): string =>+ r ? (idMap.get(r.span_id) as string) : '';+ const firstWithAttr = (key: string): LargeTraceRecord | undefined =>+ LARGE_TRACE_RECORDS.find((r) => key in r.attributes);++ const deepest = LARGE_TRACE_RECORDS.reduce((a, b) =>+ recordDepth(b, byId) > recordDepth(a, byId) ? b : a,+ );++ const landmarks = {+ root: stamp(LARGE_TRACE_RECORDS.find((r) => !r.parent_span_id)),+ errors: LARGE_TRACE_RECORDS.filter((r) => r.status_code === 2).map((r) =>+ stamp(r),+ ),+ db: stamp(firstWithAttr('db.system')),+ http: stamp(firstWithAttr('http.method')),+ llm: stamp(firstWithAttr('gen_ai.request.model')),+ messaging: stamp(firstWithAttr('messaging.system')),+ deepLeaf: stamp(deepest),+ };++ return { traceId, spans, landmarks };+}++// ── Flamegraph canvas test hook ──────────────────────────────────────────────+// The flamegraph is canvas-rendered, so individual bars have no DOM nodes. The+// frontend exposes a read-only span→rect view on window.__sigTraceFlame__+// (useFlamegraphTestHook), present only when __SIGNOZ_E2E__ is set — which+// gotoTraceUntilLoaded injects via addInitScript.++// Mirror of the API exposed by useFlamegraphTestHook.+interface FlamegraphTestApi {+ getSpanPoint: (spanId: string) => { x: number; y: number } | null;+ isSpanInView: (spanId: string) => boolean;+ getSpanColor: (spanId: string) => string | null;+}++interface FlameWindow {+ __sigTraceFlame__?: FlamegraphTestApi;+}++// Resolve a span's on-canvas viewport point, waiting through the first paint+// (the hook + spanRects populate only after the flamegraph's draw rAF).+async function spanPoint(+ page: Page,+ spanId: string,+): Promise<{ x: number; y: number }> {+ const handle = await page.waitForFunction(+ (id) =>+ (window as unknown as FlameWindow).__sigTraceFlame__?.getSpanPoint(id) ??+ null,+ spanId,+ { timeout: 10_000 },+ );+ const point = await handle.jsonValue();+ if (!point) {+ throw new Error(`flamegraph span "${spanId}" is not drawn on the canvas`);+ }+ return point;+}++// Hover the flamegraph bar for `spanId` (opens its SpanHoverCard).+export async function hoverFlamegraphSpan(+ page: Page,+ spanId: string,+): Promise<void> {+ const { x, y } = await spanPoint(page, spanId);+ await page.mouse.move(x, y);+}++// Click the flamegraph bar for `spanId` (selects the span / opens the drawer).+export async function clickFlamegraphSpan(+ page: Page,+ spanId: string,+): Promise<void> {+ const { x, y } = await spanPoint(page, spanId);+ await page.mouse.move(x, y);+ await page.mouse.click(x, y);+}++// Whether `spanId`'s bar is currently drawn AND inside the viewport container.+export async function isFlamegraphSpanInView(+ page: Page,+ spanId: string,+): Promise<boolean> {+ return page.evaluate(+ (id) =>+ (window as unknown as FlameWindow).__sigTraceFlame__?.isSpanInView(id) ??+ false,+ spanId,+ );+}++// Resting group color of a span's bar — used to assert colour-by recolor.+export async function getFlamegraphSpanColor(+ page: Page,+ spanId: string,+): Promise<string | null> {+ return page.evaluate(+ (id) =>+ (window as unknown as FlameWindow).__sigTraceFlame__?.getSpanColor(id) ??+ null,+ spanId,+ );+}++// ── User preferences (server-side, per-user) ─────────────────────────────────++// Trace-detail user-preference keys (mirror frontend constants/userPreferences.ts).+export const TRACE_PREFERENCE = {+ COLOR_BY: 'span_details_color_by_attribute',+ PREVIEW_FIELDS: 'span_details_preview_attributes',+ PINNED_ATTRIBUTES: 'span_details_pinned_attributes',+} as const;++// Whether the left nav is docked/pinned (mirror USER_PREFERENCES.SIDENAV_PINNED).+const SIDENAV_PINNED = 'sidenav_pinned';++// A telemetry field key as persisted in the preview-fields preference. Only+// `name` is required by the store (derivePreviewFields), but fieldContext /+// fieldDataType match how the UI persists them.+export interface PreviewFieldKey {+ name: string;+ fieldContext?: string;+ fieldDataType?: string;+}++// PUT a single user preference (server-side, per-user). Call BEFORE navigating+// to the trace page so its on-mount preference fetch returns the seeded value.+//+// NOTE: user preferences are GLOBAL PER USER, not per-test — they persist on the+// server for the admin user. Reset them (resetTracePreferences) in afterAll, and+// be aware other specs run by the same user in parallel share this state.+export async function setUserPreference(+ page: Page,+ name: string,+ value: unknown,+): Promise<void> {+ const token = await authToken(page);+ const res = await page.request.put(`/api/v1/user/preferences/${name}`, {+ data: { value },+ headers: { Authorization: `Bearer ${token}` },+ });+ if (!res.ok()) {+ throw new Error(+ `PUT /api/v1/user/preferences/${name} ${res.status()}: ${await res.text()}`,+ );+ }+}++// Persist the flamegraph color-by field. `fieldName` must be one of+// COLOR_BY_OPTIONS (service.name | service.namespace | host.name |+// k8s.node.name | k8s.container.name); '' falls back to the default.+export async function setColorByPreference(+ page: Page,+ fieldName: string,+): Promise<void> {+ await setUserPreference(page, TRACE_PREFERENCE.COLOR_BY, fieldName);+}++// Persist the span-details preview fields (shown as rows in the hover card).+export async function setPreviewFieldsPreference(+ page: Page,+ fields: PreviewFieldKey[],+): Promise<void> {+ await setUserPreference(page, TRACE_PREFERENCE.PREVIEW_FIELDS, fields);+}++// Reset trace-detail prefs to defaults. Run in afterAll so a prefs spec doesn't+// leak color-by / preview-field state into other specs for the same user.+export async function resetTracePreferences(page: Page): Promise<void> {+ await setColorByPreference(page, '');+ await setPreviewFieldsPreference(page, []);+}++// Pin (dock) the left nav. When unpinned it's a collapsed rail that flies out on+// hover as an absolute OVERLAY, covering the trace content's left strip — so+// hover/click on left-edge targets (the waterfall collapse arrow, flamegraph+// bars) lands on the sidebar instead. Pinned, it's a flex child that reserves+// layout space, so nothing is occluded. Set before navigating: the server pref+// wins over localStorage once preferences load.+export async function pinSidenav(page: Page): Promise<void> {+ await setUserPreference(page, SIDENAV_PINNED, true);+}diff --git a/tests/e2e/testdata/traces/large-trace.json b/tests/e2e/testdata/traces/large-trace.jsonnew file mode 100644index 0000000000..2c17b85a75--- /dev/null+++ b/tests/e2e/testdata/traces/large-trace.json@@ -0,0 +1,2482 @@+[+ {+ "span_id": "5476d0c821eb5812",+ "parent_span_id": "",+ "name": "large-trace-root",+ "kind": 1,+ "status_code": 0,+ "duration": "PT3.764059S",+ "offset_ms": 0,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "target.spans": 99+ }+ },+ {+ "span_id": "5a48159d3b5a1cc9",+ "parent_span_id": "5476d0c821eb5812",+ "name": "messaging.publish/d1",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.080000S",+ "offset_ms": 4,+ "resources": {+ "host.name": "ip-10-0-5-23",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-a-2",+ "service.name": "shipping-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "rabbitmq",+ "span.depth": 1,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "54b50f3539dcb031",+ "parent_span_id": "5a48159d3b5a1cc9",+ "name": "db.query/d2",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.071000S",+ "offset_ms": 8,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "billing-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 2,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "d11f3f8e5e33fef6",+ "parent_span_id": "5476d0c821eb5812",+ "name": "db.query/d1",+ "kind": 3,+ "status_code": 0,+ "duration": "PT3.651000S",+ "offset_ms": 95,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "payment-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "cassandra",+ "span.depth": 1,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "eb3eee3fd704958f",+ "parent_span_id": "d11f3f8e5e33fef6",+ "name": "messaging.publish/d2",+ "kind": 4,+ "status_code": 0,+ "duration": "PT3.638000S",+ "offset_ms": 105,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "payment-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "sqs",+ "span.depth": 2,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "f22a61b51c13eb63",+ "parent_span_id": "eb3eee3fd704958f",+ "name": "messaging.publish/d3",+ "kind": 4,+ "status_code": 2,+ "duration": "PT0.117000S",+ "offset_ms": 116,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "sqs",+ "span.depth": 3,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "be985d6d8d196a13",+ "parent_span_id": "f22a61b51c13eb63",+ "name": "db.query/d4",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.102000S",+ "offset_ms": 126,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "catalog-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "mysql",+ "span.depth": 4,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "1f3f7aa65e4db18f",+ "parent_span_id": "eb3eee3fd704958f",+ "name": "internal.compute/d3",+ "kind": 1,+ "status_code": 0,+ "duration": "PT3.492000S",+ "offset_ms": 241,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "billing-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 3,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "cb00daf5a25f7b26",+ "parent_span_id": "1f3f7aa65e4db18f",+ "name": "http.request/d4",+ "kind": 2,+ "status_code": 0,+ "duration": "PT0.075000S",+ "offset_ms": 248,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "auth-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "PATCH",+ "span.depth": 4,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "d8f824fffbd26a6d",+ "parent_span_id": "1f3f7aa65e4db18f",+ "name": "http.request/d4",+ "kind": 2,+ "status_code": 0,+ "duration": "PT3.392000S",+ "offset_ms": 332,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "payment-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "GET",+ "span.depth": 4,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "4efe72a09b7c3776",+ "parent_span_id": "d8f824fffbd26a6d",+ "name": "db.query/d5",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.095000S",+ "offset_ms": 340,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "cart-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 5,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "ae8c2948c03cf545",+ "parent_span_id": "d8f824fffbd26a6d",+ "name": "messaging.publish/d5",+ "kind": 4,+ "status_code": 0,+ "duration": "PT3.272000S",+ "offset_ms": 444,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "order-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "pubsub",+ "span.depth": 5,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "40ee27cf2d122a4d",+ "parent_span_id": "ae8c2948c03cf545",+ "name": "gen_ai.chat/d6",+ "kind": 3,+ "status_code": 2,+ "duration": "PT3.265000S",+ "offset_ms": 449,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "payment-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "claude-opus-4-8",+ "span.depth": 6,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "57a733c5c63eaca1",+ "parent_span_id": "40ee27cf2d122a4d",+ "name": "gen_ai.chat/d7",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.086000S",+ "offset_ms": 453,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "search-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gemini-1.5-pro",+ "span.depth": 7,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "2ba341c1e7345471",+ "parent_span_id": "40ee27cf2d122a4d",+ "name": "internal.compute/d7",+ "kind": 1,+ "status_code": 0,+ "duration": "PT3.162000S",+ "offset_ms": 543,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "recommendation-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 7,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "ac7b2d88a76ed35a",+ "parent_span_id": "2ba341c1e7345471",+ "name": "http.request/d8",+ "kind": 2,+ "status_code": 0,+ "duration": "PT3.146000S",+ "offset_ms": 549,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "inventory-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "PUT",+ "span.depth": 8,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "169350f73ac0a178",+ "parent_span_id": "ac7b2d88a76ed35a",+ "name": "gen_ai.chat/d9",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.047000S",+ "offset_ms": 556,+ "resources": {+ "host.name": "ip-10-0-5-23",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "api-gateway",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "claude-opus-4-8",+ "span.depth": 9,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "3d8758c6b23f5161",+ "parent_span_id": "ac7b2d88a76ed35a",+ "name": "db.query/d9",+ "kind": 3,+ "status_code": 0,+ "duration": "PT3.078000S",+ "offset_ms": 609,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "email-service",+ "service.namespace": "data",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 9,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "aa19b354b1ab370f",+ "parent_span_id": "3d8758c6b23f5161",+ "name": "gen_ai.chat/d10",+ "kind": 3,+ "status_code": 0,+ "duration": "PT3.060000S",+ "offset_ms": 620,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "search-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gemini-1.5-pro",+ "span.depth": 10,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "b65eb276ca848f91",+ "parent_span_id": "aa19b354b1ab370f",+ "name": "messaging.publish/d11",+ "kind": 4,+ "status_code": 0,+ "duration": "PT3.041000S",+ "offset_ms": 632,+ "resources": {+ "host.name": "ip-10-0-1-12",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "user-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "sqs",+ "span.depth": 11,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "cbab2daed3f6f598",+ "parent_span_id": "b65eb276ca848f91",+ "name": "gen_ai.chat/d12",+ "kind": 3,+ "status_code": 0,+ "duration": "PT3.027000S",+ "offset_ms": 640,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "analytics-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gpt-4o",+ "span.depth": 12,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "8f9ba7f2ad2473df",+ "parent_span_id": "cbab2daed3f6f598",+ "name": "db.query/d13",+ "kind": 3,+ "status_code": 0,+ "duration": "PT3.013000S",+ "offset_ms": 646,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "recommendation-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "mongodb",+ "span.depth": 13,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "6c7106c304dcad9f",+ "parent_span_id": "8f9ba7f2ad2473df",+ "name": "db.query/d14",+ "kind": 3,+ "status_code": 0,+ "duration": "PT2.997000S",+ "offset_ms": 651,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "search-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 14,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "af7e3a78897bd6ed",+ "parent_span_id": "6c7106c304dcad9f",+ "name": "db.query/d15",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.078000S",+ "offset_ms": 662,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "review-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "postgresql",+ "span.depth": 15,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "7dd1a07633248185",+ "parent_span_id": "af7e3a78897bd6ed",+ "name": "gen_ai.chat/d16",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.061000S",+ "offset_ms": 670,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "catalog-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gpt-4o",+ "span.depth": 16,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "5286dc80a08a2c9c",+ "parent_span_id": "6c7106c304dcad9f",+ "name": "db.query/d15",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.089000S",+ "offset_ms": 753,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "email-service",+ "service.namespace": "data",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "mongodb",+ "span.depth": 15,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "76958c21193c04e5",+ "parent_span_id": "6c7106c304dcad9f",+ "name": "gen_ai.chat/d15",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.487000S",+ "offset_ms": 854,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "search-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "claude-opus-4-8",+ "span.depth": 15,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "cf398fa4ad2f2326",+ "parent_span_id": "76958c21193c04e5",+ "name": "gen_ai.chat/d16",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.378000S",+ "offset_ms": 858,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "review-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "claude-opus-4-8",+ "span.depth": 16,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "f693cb6ea14c673b",+ "parent_span_id": "cf398fa4ad2f2326",+ "name": "messaging.publish/d17",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.183000S",+ "offset_ms": 860,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "cart-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "kafka",+ "span.depth": 17,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "488fe43b03c53096",+ "parent_span_id": "f693cb6ea14c673b",+ "name": "db.query/d18",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.012000S",+ "offset_ms": 873,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "mongodb",+ "span.depth": 18,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "6e4ec0a013003b94",+ "parent_span_id": "f693cb6ea14c673b",+ "name": "gen_ai.chat/d18",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.101000S",+ "offset_ms": 890,+ "resources": {+ "host.name": "ip-10-0-1-12",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "user-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "claude-opus-4-8",+ "span.depth": 18,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "475f4c8ab5a72d29",+ "parent_span_id": "6e4ec0a013003b94",+ "name": "gen_ai.chat/d19",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.041000S",+ "offset_ms": 894,+ "resources": {+ "host.name": "ip-10-0-1-12",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "user-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "llama-3.1-70b",+ "span.depth": 19,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "da094f4be6638fa0",+ "parent_span_id": "6e4ec0a013003b94",+ "name": "gen_ai.chat/d19",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.044000S",+ "offset_ms": 939,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "email-service",+ "service.namespace": "data",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gpt-4o",+ "span.depth": 19,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "8892e5cd094f6e1e",+ "parent_span_id": "da094f4be6638fa0",+ "name": "internal.compute/d20",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.029000S",+ "offset_ms": 949,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "analytics-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 20,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "1b6aede060e05186",+ "parent_span_id": "f693cb6ea14c673b",+ "name": "gen_ai.chat/d18",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.028000S",+ "offset_ms": 1004,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "cart-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gpt-4o",+ "span.depth": 18,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "033f73f4abb643e1",+ "parent_span_id": "cf398fa4ad2f2326",+ "name": "http.request/d17",+ "kind": 2,+ "status_code": 2,+ "duration": "PT0.047000S",+ "offset_ms": 1049,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "analytics-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "POST",+ "span.depth": 17,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "94fb61954db3602a",+ "parent_span_id": "cf398fa4ad2f2326",+ "name": "internal.compute/d17",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.096000S",+ "offset_ms": 1108,+ "resources": {+ "host.name": "ip-10-0-5-23",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-a-2",+ "service.name": "shipping-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 17,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "0e96ac20a69f0127",+ "parent_span_id": "cf398fa4ad2f2326",+ "name": "db.query/d17",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.014000S",+ "offset_ms": 1211,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "cart-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 17,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "1e3cdfca0f96390d",+ "parent_span_id": "76958c21193c04e5",+ "name": "gen_ai.chat/d16",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.091000S",+ "offset_ms": 1244,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "recommendation-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gemini-1.5-pro",+ "span.depth": 16,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "5912950f8bfde379",+ "parent_span_id": "1e3cdfca0f96390d",+ "name": "http.request/d17",+ "kind": 2,+ "status_code": 0,+ "duration": "PT0.074000S",+ "offset_ms": 1253,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "catalog-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "GET",+ "span.depth": 17,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "312bf5f76575bec5",+ "parent_span_id": "6c7106c304dcad9f",+ "name": "gen_ai.chat/d15",+ "kind": 3,+ "status_code": 0,+ "duration": "PT2.293000S",+ "offset_ms": 1351,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "inventory-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gemini-1.5-pro",+ "span.depth": 15,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "94f3beaacd156a7c",+ "parent_span_id": "312bf5f76575bec5",+ "name": "db.query/d16",+ "kind": 3,+ "status_code": 0,+ "duration": "PT2.276000S",+ "offset_ms": 1361,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "payment-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 16,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "6711d70c811da346",+ "parent_span_id": "94f3beaacd156a7c",+ "name": "internal.compute/d17",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.055000S",+ "offset_ms": 1373,+ "resources": {+ "host.name": "ip-10-0-1-12",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "user-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 17,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "e04ffb797a05c926",+ "parent_span_id": "94f3beaacd156a7c",+ "name": "http.request/d17",+ "kind": 2,+ "status_code": 0,+ "duration": "PT2.190000S",+ "offset_ms": 1437,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "catalog-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "GET",+ "span.depth": 17,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "f141590b754f76f6",+ "parent_span_id": "e04ffb797a05c926",+ "name": "messaging.publish/d18",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.084000S",+ "offset_ms": 1440,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "recommendation-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "rabbitmq",+ "span.depth": 18,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "55dcde70beaf34e2",+ "parent_span_id": "e04ffb797a05c926",+ "name": "internal.compute/d18",+ "kind": 1,+ "status_code": 2,+ "duration": "PT2.091000S",+ "offset_ms": 1533,+ "resources": {+ "host.name": "ip-10-0-5-23",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "api-gateway",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 18,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "f6a281cc4629bcd9",+ "parent_span_id": "55dcde70beaf34e2",+ "name": "db.query/d19",+ "kind": 3,+ "status_code": 0,+ "duration": "PT2.068000S",+ "offset_ms": 1546,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "inventory-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "mysql",+ "span.depth": 19,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "80b77786e58abd4b",+ "parent_span_id": "f6a281cc4629bcd9",+ "name": "gen_ai.chat/d20",+ "kind": 3,+ "status_code": 0,+ "duration": "PT2.056000S",+ "offset_ms": 1555,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "payment-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "claude-opus-4-8",+ "span.depth": 20,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "20b8f57a060f388b",+ "parent_span_id": "80b77786e58abd4b",+ "name": "db.query/d21",+ "kind": 3,+ "status_code": 0,+ "duration": "PT2.043000S",+ "offset_ms": 1565,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "email-service",+ "service.namespace": "data",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "mongodb",+ "span.depth": 21,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "f12207bb1aa931ab",+ "parent_span_id": "20b8f57a060f388b",+ "name": "internal.compute/d22",+ "kind": 1,+ "status_code": 0,+ "duration": "PT2.035000S",+ "offset_ms": 1571,+ "resources": {+ "host.name": "ip-10-0-1-12",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "user-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 22,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "cec3994c2b4f6180",+ "parent_span_id": "f12207bb1aa931ab",+ "name": "internal.compute/d23",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.069000S",+ "offset_ms": 1577,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 23,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "77923cb5ab1c7791",+ "parent_span_id": "f12207bb1aa931ab",+ "name": "messaging.publish/d23",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.041000S",+ "offset_ms": 1659,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "order-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "sqs",+ "span.depth": 23,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "91e1e5be6d646409",+ "parent_span_id": "f12207bb1aa931ab",+ "name": "http.request/d23",+ "kind": 2,+ "status_code": 0,+ "duration": "PT1.888000S",+ "offset_ms": 1712,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "DELETE",+ "span.depth": 23,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "fea8602c618de415",+ "parent_span_id": "91e1e5be6d646409",+ "name": "internal.compute/d24",+ "kind": 1,+ "status_code": 0,+ "duration": "PT1.873000S",+ "offset_ms": 1720,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "review-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 24,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "173bd5604516e3c0",+ "parent_span_id": "fea8602c618de415",+ "name": "db.query/d25",+ "kind": 3,+ "status_code": 0,+ "duration": "PT1.857000S",+ "offset_ms": 1730,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 25,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "b0ba971b32cc9825",+ "parent_span_id": "173bd5604516e3c0",+ "name": "messaging.publish/d26",+ "kind": 4,+ "status_code": 2,+ "duration": "PT0.098000S",+ "offset_ms": 1737,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "cart-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "sqs",+ "span.depth": 26,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "88fc30f518446d75",+ "parent_span_id": "173bd5604516e3c0",+ "name": "db.query/d26",+ "kind": 3,+ "status_code": 0,+ "duration": "PT1.735000S",+ "offset_ms": 1842,+ "resources": {+ "host.name": "ip-10-0-5-23",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "api-gateway",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 26,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "df406c83a1e20da9",+ "parent_span_id": "88fc30f518446d75",+ "name": "internal.compute/d27",+ "kind": 1,+ "status_code": 0,+ "duration": "PT1.719000S",+ "offset_ms": 1848,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "billing-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 27,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "5ece93c7ef503f4b",+ "parent_span_id": "df406c83a1e20da9",+ "name": "db.query/d28",+ "kind": 3,+ "status_code": 0,+ "duration": "PT1.550000S",+ "offset_ms": 1852,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "analytics-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 28,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "200d892c68265660",+ "parent_span_id": "5ece93c7ef503f4b",+ "name": "db.query/d29",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.396000S",+ "offset_ms": 1855,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "payment-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 29,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "e99cf02303ceff62",+ "parent_span_id": "200d892c68265660",+ "name": "db.query/d30",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.387000S",+ "offset_ms": 1857,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "search-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 30,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "628e7a63ed682d83",+ "parent_span_id": "e99cf02303ceff62",+ "name": "messaging.publish/d31",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.018000S",+ "offset_ms": 1863,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "order-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "rabbitmq",+ "span.depth": 31,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "3affca42b9640c73",+ "parent_span_id": "e99cf02303ceff62",+ "name": "gen_ai.chat/d31",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.060000S",+ "offset_ms": 1887,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "analytics-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gpt-4o",+ "span.depth": 31,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "856369367e1f3a05",+ "parent_span_id": "e99cf02303ceff62",+ "name": "http.request/d31",+ "kind": 2,+ "status_code": 0,+ "duration": "PT0.284000S",+ "offset_ms": 1956,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "inventory-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "POST",+ "span.depth": 31,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "142bef10a7f41eca",+ "parent_span_id": "856369367e1f3a05",+ "name": "gen_ai.chat/d32",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.029000S",+ "offset_ms": 1962,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "cart-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gemini-1.5-pro",+ "span.depth": 32,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "9612b61068457701",+ "parent_span_id": "142bef10a7f41eca",+ "name": "db.query/d33",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.012000S",+ "offset_ms": 1970,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "order-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "cassandra",+ "span.depth": 33,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "84af64e330a1f38e",+ "parent_span_id": "856369367e1f3a05",+ "name": "http.request/d32",+ "kind": 2,+ "status_code": 0,+ "duration": "PT0.058000S",+ "offset_ms": 2008,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "cart-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "PATCH",+ "span.depth": 32,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "f62e4b84cafb4f31",+ "parent_span_id": "84af64e330a1f38e",+ "name": "internal.compute/d33",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.038000S",+ "offset_ms": 2017,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "catalog-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 33,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "14e1dd235a89c26b",+ "parent_span_id": "856369367e1f3a05",+ "name": "gen_ai.chat/d32",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.094000S",+ "offset_ms": 2069,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "catalog-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "claude-opus-4-8",+ "span.depth": 32,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "b31ae7054f701488",+ "parent_span_id": "856369367e1f3a05",+ "name": "messaging.publish/d32",+ "kind": 4,+ "status_code": 2,+ "duration": "PT0.060000S",+ "offset_ms": 2176,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "cart-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "rabbitmq",+ "span.depth": 32,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "13b8dcd3e1d6233d",+ "parent_span_id": "b31ae7054f701488",+ "name": "gen_ai.chat/d33",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.046000S",+ "offset_ms": 2182,+ "resources": {+ "host.name": "ip-10-0-5-23",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "api-gateway",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gemini-1.5-pro",+ "span.depth": 33,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "84d6061ac9477b6e",+ "parent_span_id": "5ece93c7ef503f4b",+ "name": "messaging.publish/d29",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.039000S",+ "offset_ms": 2260,+ "resources": {+ "host.name": "ip-10-0-1-12",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "notification-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "sqs",+ "span.depth": 29,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "bd31ad40a28cc788",+ "parent_span_id": "84d6061ac9477b6e",+ "name": "http.request/d30",+ "kind": 2,+ "status_code": 0,+ "duration": "PT0.024000S",+ "offset_ms": 2270,+ "resources": {+ "host.name": "ip-10-0-1-12",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "user-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "DELETE",+ "span.depth": 30,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "1f3050b53671f47e",+ "parent_span_id": "5ece93c7ef503f4b",+ "name": "http.request/d29",+ "kind": 2,+ "status_code": 0,+ "duration": "PT1.082000S",+ "offset_ms": 2311,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "billing-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "GET",+ "span.depth": 29,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "5da03b83c7342ce5",+ "parent_span_id": "1f3050b53671f47e",+ "name": "gen_ai.chat/d30",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.024000S",+ "offset_ms": 2316,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gpt-4o",+ "span.depth": 30,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "15c158acb7b7ebde",+ "parent_span_id": "1f3050b53671f47e",+ "name": "internal.compute/d30",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.521000S",+ "offset_ms": 2348,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "inventory-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 30,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "8875af25e4f33dd2",+ "parent_span_id": "15c158acb7b7ebde",+ "name": "messaging.publish/d31",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.330000S",+ "offset_ms": 2355,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "billing-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "rabbitmq",+ "span.depth": 31,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "70330dd280996fe5",+ "parent_span_id": "8875af25e4f33dd2",+ "name": "db.query/d32",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.180000S",+ "offset_ms": 2368,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "fraud-detection",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 32,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "62306e305566d3f5",+ "parent_span_id": "70330dd280996fe5",+ "name": "messaging.publish/d33",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.168000S",+ "offset_ms": 2373,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "recommendation-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "pubsub",+ "span.depth": 33,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "194edb1119b57a98",+ "parent_span_id": "62306e305566d3f5",+ "name": "messaging.publish/d34",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.067000S",+ "offset_ms": 2384,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "pubsub",+ "span.depth": 34,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "ccdb7266c2152bb7",+ "parent_span_id": "62306e305566d3f5",+ "name": "gen_ai.chat/d34",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.077000S",+ "offset_ms": 2462,+ "resources": {+ "host.name": "ip-10-0-5-23",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-a-2",+ "service.name": "shipping-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "gpt-4o",+ "span.depth": 34,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "a0def7ce3aaec4de",+ "parent_span_id": "8875af25e4f33dd2",+ "name": "db.query/d32",+ "kind": 3,+ "status_code": 2,+ "duration": "PT0.094000S",+ "offset_ms": 2552,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "analytics-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "redis",+ "span.depth": 32,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "1e043d5df6fb2e17",+ "parent_span_id": "a0def7ce3aaec4de",+ "name": "messaging.publish/d33",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.080000S",+ "offset_ms": 2554,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "analytics-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "pubsub",+ "span.depth": 33,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "5c18caec1deda8ce",+ "parent_span_id": "8875af25e4f33dd2",+ "name": "internal.compute/d32",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.023000S",+ "offset_ms": 2659,+ "resources": {+ "host.name": "ip-10-0-1-12",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-2",+ "service.name": "notification-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 32,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "0313f80fa6b17461",+ "parent_span_id": "15c158acb7b7ebde",+ "name": "gen_ai.chat/d31",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.163000S",+ "offset_ms": 2697,+ "resources": {+ "host.name": "ip-10-0-5-23",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "api-gateway",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "claude-opus-4-8",+ "span.depth": 31,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "8d632410a7c964c3",+ "parent_span_id": "0313f80fa6b17461",+ "name": "http.request/d32",+ "kind": 2,+ "status_code": 0,+ "duration": "PT0.052000S",+ "offset_ms": 2699,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "payment-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "PUT",+ "span.depth": 32,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "87be07c3b8e992b0",+ "parent_span_id": "0313f80fa6b17461",+ "name": "db.query/d32",+ "kind": 3,+ "status_code": 2,+ "duration": "PT0.087000S",+ "offset_ms": 2762,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "fraud-detection",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "cassandra",+ "span.depth": 32,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "5c8be1009aa3e419",+ "parent_span_id": "1f3050b53671f47e",+ "name": "internal.compute/d30",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.512000S",+ "offset_ms": 2875,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "fraud-detection",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 30,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "3cac93ebb854ab29",+ "parent_span_id": "5c8be1009aa3e419",+ "name": "internal.compute/d31",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.490000S",+ "offset_ms": 2886,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 31,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "da1d7d63b7d7a61f",+ "parent_span_id": "3cac93ebb854ab29",+ "name": "messaging.publish/d32",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.125000S",+ "offset_ms": 2895,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "billing-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "pubsub",+ "span.depth": 32,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "07b99de5c9e5a339",+ "parent_span_id": "da1d7d63b7d7a61f",+ "name": "gen_ai.chat/d33",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.106000S",+ "offset_ms": 2905,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "cart-service",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "gen_ai.request.model": "llama-3.1-70b",+ "span.depth": 33,+ "span.operation": "gen_ai.chat",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "ac5e4ffe5d1d8d78",+ "parent_span_id": "3cac93ebb854ab29",+ "name": "internal.compute/d32",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.055000S",+ "offset_ms": 3029,+ "resources": {+ "host.name": "ip-10-0-3-78",+ "k8s.container.name": "sidecar",+ "k8s.node.name": "gke-prod-pool-a-1",+ "service.name": "frontend",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 32,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "2f48c28ec4c31489",+ "parent_span_id": "3cac93ebb854ab29",+ "name": "messaging.publish/d32",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.186000S",+ "offset_ms": 3090,+ "resources": {+ "host.name": "ip-10-0-6-56",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "review-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "kafka",+ "span.depth": 32,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "ef5181f0c49d4195",+ "parent_span_id": "2f48c28ec4c31489",+ "name": "internal.compute/d33",+ "kind": 1,+ "status_code": 0,+ "duration": "PT0.029000S",+ "offset_ms": 3103,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "search-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "span.depth": 33,+ "span.operation": "internal.compute",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "3c41f0e98b63ff72",+ "parent_span_id": "2f48c28ec4c31489",+ "name": "messaging.publish/d33",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.069000S",+ "offset_ms": 3140,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-c-1",+ "service.name": "inventory-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "rabbitmq",+ "span.depth": 33,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "e75512c171d64323",+ "parent_span_id": "2f48c28ec4c31489",+ "name": "messaging.publish/d33",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.053000S",+ "offset_ms": 3212,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "auth-service",+ "service.namespace": "checkout",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "rabbitmq",+ "span.depth": 33,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "3c1f1253435f24d2",+ "parent_span_id": "3cac93ebb854ab29",+ "name": "db.query/d32",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.080000S",+ "offset_ms": 3291,+ "resources": {+ "host.name": "ip-10-0-4-91",+ "k8s.container.name": "main",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "payment-service",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "postgresql",+ "span.depth": 32,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "b8dc7f03b4aa1f64",+ "parent_span_id": "df406c83a1e20da9",+ "name": "http.request/d28",+ "kind": 2,+ "status_code": 0,+ "duration": "PT0.047000S",+ "offset_ms": 3405,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "server",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "search-service",+ "service.namespace": "platform",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "http.method": "POST",+ "span.depth": 28,+ "span.operation": "http.request",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "4fbacfbfe53984d9",+ "parent_span_id": "b8dc7f03b4aa1f64",+ "name": "db.query/d29",+ "kind": 3,+ "status_code": 0,+ "duration": "PT0.034000S",+ "offset_ms": 3410,+ "resources": {+ "host.name": "ip-10-0-5-23",+ "k8s.container.name": "app",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "api-gateway",+ "service.namespace": "identity",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "db.system": "cassandra",+ "span.depth": 29,+ "span.operation": "db.query",+ "span.structure": "tree"+ }+ },+ {+ "span_id": "f1f9881574a8525e",+ "parent_span_id": "df406c83a1e20da9",+ "name": "messaging.publish/d28",+ "kind": 4,+ "status_code": 0,+ "duration": "PT0.092000S",+ "offset_ms": 3469,+ "resources": {+ "host.name": "ip-10-0-2-45",+ "k8s.container.name": "worker",+ "k8s.node.name": "gke-prod-pool-b-1",+ "service.name": "fraud-detection",+ "service.namespace": "ecommerce",+ "service.version": "1.1.0",+ "signoz.workspace.key.id": "019d9a99-f8f0-7e50-8bb3-995599fa1f76",+ "signoz.workspace.tag.cluster.name": "saas-us-central1-c"+ },+ "attributes": {+ "messaging.system": "kafka",+ "span.depth": 28,+ "span.operation": "messaging.publish",+ "span.structure": "tree"+ }+ }+]diff --git a/tests/e2e/tests/trace-details/drawer.spec.ts b/tests/e2e/tests/trace-details/drawer.spec.tsnew file mode 100644index 0000000000..f92e93dc5c--- /dev/null+++ b/tests/e2e/tests/trace-details/drawer.spec.ts@@ -0,0 +1,69 @@+import { test, expect } from '../../fixtures/auth';+import {+ gotoTraceUntilLoaded,+ loadLargeTrace,+ seedTracesViaSeeder,+} from '../../helpers/trace-details';++// One shared trace for the whole file, seeded once. Unique ids per run keep this+// isolated from other parallel specs; the global teardown clears the traces signal.+const trace = loadLargeTrace();++test.describe('Trace details — span details drawer', () => {+ test.beforeAll(async ({ playwright }) => {+ // Seed once via a disposable request context — no auth needed (direct+ // seeder call), and cheaper than spinning up a full browser page.+ const request = await playwright.request.newContext();+ await seedTracesViaSeeder(request, trace.spans);+ await request.dispose();+ });++ test.beforeEach(async ({ authedPage: page }) => {+ // open the trace, reloading until the waterfall renders (seed→query lag)+ await gotoTraceUntilLoaded(+ page,+ `/trace/${trace.traceId}`,+ `cell-0-${trace.landmarks.root}`,+ );+ });++ test('TC-01 the floating drawer can be dragged', async ({+ authedPage: page,+ }) => {+ await page.getByTestId(`cell-0-${trace.landmarks.root}`).click();+ await page.getByTestId('dock-mode-dialog').click();++ const handle = page.locator('.floating-panel__drag-handle');+ await expect(handle).toBeVisible();++ const zero = { x: 0, y: 0, width: 0, height: 0 };+ const before = (await handle.boundingBox()) ?? zero;+ // Drag from the left of the header (title area) to avoid the action buttons.+ const startX = before.x + 30;+ const startY = before.y + before.height / 2;+ await page.mouse.move(startX, startY);+ await page.mouse.down();+ await page.mouse.move(startX - 120, startY + 80, { steps: 8 });+ await page.mouse.up();++ await expect+ .poll(async () => Math.round(((await handle.boundingBox()) ?? before).x))+ .toBeLessThan(Math.round(before.x));+ });++ test('TC-02 a dock-mode change persists and is restored on reload', async ({+ authedPage: page,+ }) => {+ // §0 prefs-boot, UI-first: switch to floating via the dock-mode UI (which+ // persists the variant), then reload and confirm it's restored — the drawer+ // boots floating, not the docked-right default.+ await page.getByTestId(`cell-0-${trace.landmarks.root}`).click();+ await page.getByTestId('dock-mode-dialog').click();+ await expect(page.locator('.floating-panel__drag-handle')).toBeVisible();++ await page.reload();+ await page.getByTestId(`cell-0-${trace.landmarks.root}`).click();++ await expect(page.locator('.floating-panel__drag-handle')).toBeVisible();+ });+});diff --git a/tests/e2e/tests/trace-details/flamegraph.spec.ts b/tests/e2e/tests/trace-details/flamegraph.spec.tsnew file mode 100644index 0000000000..775d3cd693--- /dev/null+++ b/tests/e2e/tests/trace-details/flamegraph.spec.ts@@ -0,0 +1,114 @@+import { test, expect } from '../../fixtures/auth';+import { newAdminContext } from '../../helpers/auth';+import {+ changeColourByViaMenu,+ clickFlamegraphSpan,+ getFlamegraphSpanColor,+ gotoTraceUntilLoaded,+ hoverFlamegraphSpan,+ isFlamegraphSpanInView,+ loadLargeTrace,+ seedTracesViaSeeder,+ setColorByPreference,+} from '../../helpers/trace-details';++// The flamegraph is canvas-rendered, so individual bars have no DOM nodes. These+// specs drive it through the window.__sigTraceFlame__ test hook (enabled by+// gotoTraceUntilLoaded) — see helpers/trace-details.ts — which resolves a span's+// on-canvas point from the live span→rect map and dispatches real mouse events.+//+// One shared trace for the file, seeded once. Random ids per run isolate it from+// other parallel specs; the global teardown clears the traces signal.+//+// Colour-by recolor is asserted via the hook's getSpanColor (the resting group+// color per bar), since canvas pixels aren't directly assertable.+//+// Deferred: sampled large trace — sampling needs >100k spans+// (FLAMEGRAPH_SPAN_LIMIT), which is the deferred large-trace work.+const trace = loadLargeTrace();++test.describe('Trace details — flamegraph', () => {+ test.beforeAll(async ({ playwright }) => {+ const request = await playwright.request.newContext();+ await seedTracesViaSeeder(request, trace.spans);+ await request.dispose();+ });++ test.afterAll(async ({ browser }) => {+ // TC-04 changes colour-by — a per-user pref. Reset it so it doesn't leak to+ // other specs (afterAll can't use the test-scoped authedPage fixture).+ const ctx = await newAdminContext(browser);+ const page = await ctx.newPage();+ await setColorByPreference(page, '');+ await ctx.close();+ });++ test.beforeEach(async ({ authedPage: page }) => {+ await gotoTraceUntilLoaded(+ page,+ `/trace/${trace.traceId}`,+ `cell-0-${trace.landmarks.root}`,+ );+ });++ test('TC-01 hovering an error bar opens its hover card with status/start/duration', async ({+ authedPage: page,+ }) => {+ await hoverFlamegraphSpan(page, trace.landmarks.errors[0]);++ // "status: error" only renders in the hover card (not in waterfall rows),+ // so it proves both that the card opened and that we hovered the right+ // (error) span — the bar was targeted by id via the span→rect map.+ await expect(page.getByText('status: error')).toBeVisible();+ await expect(page.getByText(/start: [\d.]+ ms/)).toBeVisible();+ await expect(page.getByText(/duration: [\d.]+/)).toBeVisible();+ });++ test('TC-02 clicking a bar selects the span, opens the drawer, and syncs the waterfall row', async ({+ authedPage: page,+ }) => {+ await clickFlamegraphSpan(page, trace.landmarks.db);++ // selection is reflected in the shared URL state...+ await expect(page).toHaveURL(new RegExp(`spanId=${trace.landmarks.db}`));+ // ...the drawer opens (Overview tab is drawer-only)...+ await expect(page.getByRole('tab', { name: /overview/i })).toBeVisible();+ // ...and the same span's waterfall row is present (views share selection).+ await expect(page.getByTestId(`cell-0-${trace.landmarks.db}`)).toBeVisible();+ });++ test('TC-03 deep-linking a deeply-nested span scrolls it into view on the flamegraph', async ({+ authedPage: page,+ }) => {+ // Open pre-pointed at a deep (level ~34) span; useScrollToSpan should+ // center it, so its bar becomes drawn and inside the viewport container.+ await gotoTraceUntilLoaded(+ page,+ `/trace/${trace.traceId}?spanId=${trace.landmarks.deepLeaf}`,+ `cell-0-${trace.landmarks.deepLeaf}`,+ );++ await expect+ .poll(() => isFlamegraphSpanInView(page, trace.landmarks.deepLeaf))+ .toBe(true);+ });++ test('TC-04 changing colour-by recolors the flamegraph bars', async ({+ authedPage: page,+ }) => {+ // colour-by persists per-user, so set an explicit baseline rather than+ // assuming the default. Root's color under service.name:+ await changeColourByViaMenu(page, 'service.name');+ const colorByService = await getFlamegraphSpanColor(+ page,+ trace.landmarks.root,+ );+ expect(colorByService).not.toBeNull();++ // Switch to host.name → root groups by a different value → new color.+ await changeColourByViaMenu(page, 'host.name');+ await expect+ .poll(() => getFlamegraphSpanColor(page, trace.landmarks.root))+ .not.toBe(colorByService);+ });+});diff --git a/tests/e2e/tests/trace-details/header.spec.ts b/tests/e2e/tests/trace-details/header.spec.tsnew file mode 100644index 0000000000..3b1d67d707--- /dev/null+++ b/tests/e2e/tests/trace-details/header.spec.ts@@ -0,0 +1,57 @@+import { test, expect } from '../../fixtures/auth';+import {+ gotoTraceUntilLoaded,+ loadLargeTrace,+ seedTracesViaSeeder,+} from '../../helpers/trace-details';++// §1 header — the Analytics FloatingPanel. The action cluster (Analytics button+// + options menu) only renders once trace data is loaded, which gotoTraceUntilLoaded+// guarantees by waiting for the root waterfall row.+//+// Not covered here: subheader summary (presentational → unit test), colour-by /+// options menu / trace-id copy (unit), Noz button (feature-flagged, lives in the+// filter bar). Resize is deferred — react-rnd's resize handles have no stable hook.+const trace = loadLargeTrace();++test.describe('Trace details — header analytics panel', () => {+ test.beforeAll(async ({ playwright }) => {+ const request = await playwright.request.newContext();+ await seedTracesViaSeeder(request, trace.spans);+ await request.dispose();+ });++ test.beforeEach(async ({ authedPage: page }) => {+ await gotoTraceUntilLoaded(+ page,+ `/trace/${trace.traceId}`,+ `cell-0-${trace.landmarks.root}`,+ );+ });++ test('TC-01 the analytics panel can be dragged by its header', async ({+ authedPage: page,+ }) => {+ await page.getByRole('button', { name: 'Analytics' }).click();+ const panel = page.getByTestId('trace-analytics-panel');+ await expect(panel).toBeVisible();++ const zero = { x: 0, y: 0, width: 0, height: 0 };+ const before = (await panel.boundingBox()) ?? zero;+ const hb =+ (await page.locator('.floating-panel__drag-handle').boundingBox()) ?? zero;++ // Drag the header left + down.+ await page.mouse.move(hb.x + hb.width / 2, hb.y + hb.height / 2);+ await page.mouse.down();+ await page.mouse.move(hb.x + hb.width / 2 - 120, hb.y + hb.height / 2 + 60, {+ steps: 8,+ });+ await page.mouse.up();++ // Panel shifted left.+ await expect+ .poll(async () => Math.round(((await panel.boundingBox()) ?? before).x))+ .toBeLessThan(Math.round(before.x));+ });+});diff --git a/tests/e2e/tests/trace-details/preview-fields.spec.ts b/tests/e2e/tests/trace-details/preview-fields.spec.tsnew file mode 100644index 0000000000..da7d582766--- /dev/null+++ b/tests/e2e/tests/trace-details/preview-fields.spec.ts@@ -0,0 +1,88 @@+import { test, expect } from '../../fixtures/auth';+import { newAdminContext } from '../../helpers/auth';+import {+ gotoTraceUntilLoaded,+ hoverFlamegraphSpan,+ loadLargeTrace,+ resetTracePreferences,+ seedTracesViaSeeder,+ setPreviewFieldsPreference,+} from '../../helpers/trace-details';++// §6 — preview fields. A configured preview field appears as a row in the span+// hover card (SpanTooltipContent, testid span-hover-card-preview-<key>). The+// waterfall variant is covered at the unit/integration level; this spec keeps+// the flamegraph (canvas) case, which can't run in jsdom.+//+// Preview fields are a server-side, per-user preference, so each test seeds them+// via the API before navigating; afterAll resets them so the state doesn't leak+// into other specs run by the same admin user.+const trace = loadLargeTrace();++// The db landmark span carries db.system="redis"; seed db.system as a preview+// field so its value renders in the hover card.+const PREVIEW_FIELD = 'db.system';+const PREVIEW_VALUE = 'redis';+const PREVIEW_TESTID = `span-hover-card-preview-${PREVIEW_FIELD}`;++// Skipped wholesale until the flamegraph preview-fields fetch race (FE bug, see+// the TC-01 FIXME + sprint task) is fixed — the only case here is that flamegraph+// hover test, which can't pass reliably yet. The waterfall variant moved to+// unit/integration. Re-enable (and un-fixme TC-01) once the flamegraph+// gates/refetches on previewFields.+test.describe.skip('Trace details — preview fields in the hover card', () => {+ // Run serially in one worker: preview fields are a per-user preference, so+ // the afterAll reset must not race a sibling test still using them on another+ // worker (which intermittently wiped the preview row mid-test).+ test.describe.configure({ mode: 'serial' });++ test.beforeAll(async ({ playwright }) => {+ const request = await playwright.request.newContext();+ await seedTracesViaSeeder(request, trace.spans);+ await request.dispose();+ });++ test.afterAll(async ({ browser }) => {+ // Reset prefs to defaults (afterAll can't use the authedPage fixture).+ const ctx = await newAdminContext(browser);+ const page = await ctx.newPage();+ await resetTracePreferences(page);+ await ctx.close();+ });++ test.beforeEach(async ({ authedPage: page }) => {+ // Seed the preview field BEFORE navigating so the on-mount prefs fetch+ // returns it and the hover card renders the row.+ // db.system is a span ATTRIBUTE (fieldContext 'attribute', not 'span') —+ // the flamegraph fetches fields selectively, so the wrong context means+ // the bar's span wouldn't carry the value and the hover row wouldn't render.+ await setPreviewFieldsPreference(page, [+ { name: PREVIEW_FIELD, fieldContext: 'attribute', fieldDataType: 'string' },+ ]);+ await gotoTraceUntilLoaded(+ page,+ `/trace/${trace.traceId}`,+ `cell-0-${trace.landmarks.root}`,+ );+ });++ // FIXME: blocked by a frontend bug — the flamegraph fires its span fetch+ // (POST /flamegraph) with selectFields = color-by only, before previewFields+ // syncs into the store, and does NOT refetch when the preference lands. So the+ // flamegraph span never carries the preview attribute (e.g. db.system) and its+ // hover card can't render the row. Intermittent (passes only when prefs are+ // cache-warm before the first fetch). Re-enable once the flamegraph+ // gates/refetches on previewFields. See sprint task.+ test.fixme('TC-01 flamegraph hover card shows the configured preview field', async ({+ authedPage: page,+ }) => {+ const previewRow = page.getByTestId(PREVIEW_TESTID).first();+ await expect(async () => {+ await page.mouse.move(0, 0);+ await hoverFlamegraphSpan(page, trace.landmarks.db);+ await expect(previewRow).toBeVisible({ timeout: 1500 });+ }).toPass({ timeout: 15_000 });++ await expect(previewRow).toContainText(PREVIEW_VALUE);+ });+});diff --git a/tests/e2e/tests/trace-details/waterfall.spec.ts b/tests/e2e/tests/trace-details/waterfall.spec.tsnew file mode 100644index 0000000000..9c65f9e461--- /dev/null+++ b/tests/e2e/tests/trace-details/waterfall.spec.ts@@ -0,0 +1,50 @@+import { test, expect } from '../../fixtures/auth';+import {+ gotoTraceUntilLoaded,+ loadLargeTrace,+ seedTracesViaSeeder,+} from '../../helpers/trace-details';++const trace = loadLargeTrace();++test.describe('Trace details — waterfall', () => {+ test.beforeAll(async ({ playwright }) => {+ const request = await playwright.request.newContext();+ await seedTracesViaSeeder(request, trace.spans);+ await request.dispose();+ });++ test('TC-01 deep-link ?spanId auto-selects the span and opens the drawer', async ({+ authedPage: page,+ }) => {+ // Open the trace pre-pointed at a specific span via the URL, reloading+ // until the waterfall renders (seed→query lag).+ const errorSpan = trace.landmarks.errors[0];+ await gotoTraceUntilLoaded(+ page,+ `/trace/${trace.traceId}?spanId=${errorSpan}`,+ `cell-0-${errorSpan}`,+ );++ // the deep-linked span's row renders...+ await expect(page.getByTestId(`cell-0-${errorSpan}`)).toBeVisible();+ // ...and it auto-selects → the drawer is open (Overview tab is drawer-only)+ await expect(page.getByRole('tab', { name: /overview/i })).toBeVisible();+ });++ test('TC-02 deep-linking a deeply-nested span auto-expands ancestors and scrolls it into view', async ({+ authedPage: page,+ }) => {+ // deepLeaf sits ~34 levels down; rendering its row at all proves every+ // ancestor auto-expanded and the waterfall scrolled it into view.+ const deep = trace.landmarks.deepLeaf;+ await gotoTraceUntilLoaded(+ page,+ `/trace/${trace.traceId}?spanId=${deep}`,+ `cell-0-${deep}`,+ );++ await expect(page.getByTestId(`cell-0-${deep}`)).toBeVisible();+ await expect(page).toHaveURL(new RegExp(`spanId=${deep}`));+ });+});