Skip to content

feat(tracemetrics): Lazy load trace details per metric#115066

Merged
nsdeschenes merged 17 commits into
masterfrom
nd/EXP-934/feat-metrics-lazy-load-trace-details-per-metric
May 21, 2026
Merged

feat(tracemetrics): Lazy load trace details per metric#115066
nsdeschenes merged 17 commits into
masterfrom
nd/EXP-934/feat-metrics-lazy-load-trace-details-per-metric

Conversation

@nsdeschenes
Copy link
Copy Markdown
Contributor

@nsdeschenes nsdeschenes commented May 7, 2026

This PR adds back (sorta) trace info for a given metric, however this time we're loading this data when users expand a metric.

Closes EXP-934

Example:

Screenshot 2026-05-14 at 13 21 32

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 7, 2026

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.62%

Comment thread static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx Outdated
Comment thread static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx Outdated
Comment thread static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx Outdated
Comment thread static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx Outdated
Comment thread static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx Outdated
nsdeschenes and others added 13 commits May 14, 2026 11:40
Convert metric sample row timestamps through the shared table date parser before fetching trace meta. This keeps ISO timestamp rows scoped to the sample time instead of falling back to a stats period query.

Update the trace meta hook tests for the new isLoading result field and add regression coverage for the metric detail request timestamp.

Co-Authored-By: Codex <noreply@openai.com>
Return an empty details row when an expanded metric sample has no trace detail data, and add regression coverage for the no-data state.
Add the loading state required by trace metadata fixtures and adjust the metric trace detail mock cast so the tests match the hook return type.

Refs EXP-934
Render explicit empty states when metric sample attributes or trace summary data are unavailable.

Co-Authored-By: Codex <noreply@openai.com>
Use trace meta count helpers when rendering expanded metric sample details so the summary works across trace meta shapes and includes metric counts.

Refs EXP-934
Assert expanded metric sample details render normalized trace meta counts and verify merged EAP metric counts through the trace meta helper.

Refs EXP-934

Co-Authored-By: OpenAI Codex <noreply@openai.com>
Keep isEAPTraceMeta module-local so Knip no longer reports it as an unused public export.

Co-Authored-By: Codex <noreply@openai.com>
Show a trace summary error when trace meta requests fail and keep the expanded row markup valid by wrapping the details error state in a table cell.

Co-Authored-By: Codex <noreply@openai.com>
Add coverage for expanded metric sample trace meta failures and trace detail failures using a fixed fixture timestamp.

Co-Authored-By: Codex <noreply@openai.com>
@nsdeschenes nsdeschenes force-pushed the nd/EXP-934/feat-metrics-lazy-load-trace-details-per-metric branch from 585452d to 407d6b5 Compare May 14, 2026 14:53
@nsdeschenes
Copy link
Copy Markdown
Contributor Author

@cursor review

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 407d6b5. Configure here.

@nsdeschenes nsdeschenes marked this pull request as ready for review May 14, 2026 16:33
@nsdeschenes nsdeschenes requested review from a team as code owners May 14, 2026 16:34
Comment thread static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx
Comment thread static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx Outdated
Comment thread static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx
nsdeschenes and others added 2 commits May 19, 2026 15:14
…rics-lazy-load-trace-details-per-metric

# Conflicts:
#	static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx
#	static/app/views/performance/newTraceDetails/traceApi/useTraceMeta.tsx
Use the active loading state for metric trace detail fetches so disabled TanStack queries can fall through to the empty state.

Add coverage for the disabled query case where isPending remains true without an active fetch.

Co-Authored-By: Codex <noreply@openai.com>
Comment thread static/app/views/explore/metrics/metricInfoTabs/metricDetails.tsx Outdated
@nsdeschenes nsdeschenes merged commit 41863b5 into master May 21, 2026
71 checks passed
@nsdeschenes nsdeschenes deleted the nd/EXP-934/feat-metrics-lazy-load-trace-details-per-metric branch May 21, 2026 17:52
natemoo-re pushed a commit that referenced this pull request May 21, 2026
This PR adds back (sorta) trace info for a given metric, however this
time we're loading this data when users expand a metric.

Closes EXP-934

---------

Co-authored-by: Codex <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants