Skip to content

fix(profiling): use granular transactionResult properties in useMemo deps#114757

Merged
JoshuaKGoldberg merged 2 commits into
masterfrom
flamegraph-transaction-memo-references
May 5, 2026
Merged

fix(profiling): use granular transactionResult properties in useMemo deps#114757
JoshuaKGoldberg merged 2 commits into
masterfrom
flamegraph-transaction-memo-references

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Member

@JoshuaKGoldberg JoshuaKGoldberg commented May 4, 2026

transactionResult isn't a stable reference each time it's retrieved from useProfileTransaction. This switches the useMemo hooks in Flamegraph that depend on its properties to directly take those properties in the deps array.

I noticed there are similar areas of code in ContinuousFlamegraph but don't know of any similar issues around them. So I held off changing them.

Example flamegraph I've used to reproduce the issue: https://sentry-32x8jq18g.sentry.dev/explore/profiling/profile/sentry/b983eba8593e4830a0d1eb250c18ab34/flamegraph/?colorCoding=by%20system%20vs%20application%20frame&fov=9142325%2C55%2C37698432%2C23&query=&sorting=call%20order&tid=132495722907328&view=top%20down

Fixes EXP-928.

@JoshuaKGoldberg JoshuaKGoldberg requested a review from mjq May 4, 2026 19:19
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 4, 2026

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

github-actions Bot commented May 4, 2026

📊 Type Coverage Diff

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

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review May 4, 2026 19:27
@JoshuaKGoldberg JoshuaKGoldberg requested a review from a team as a code owner May 4, 2026 19:27
@JoshuaKGoldberg JoshuaKGoldberg removed the request for review from mjq May 4, 2026 19:28
@JoshuaKGoldberg JoshuaKGoldberg merged commit 8278f70 into master May 5, 2026
74 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the flamegraph-transaction-memo-references branch May 5, 2026 14:26
cleptric pushed a commit that referenced this pull request May 5, 2026
…deps (#114757)

`transactionResult` isn't a stable reference each time it's retrieved
from `useProfileTransaction`. This switches the `useMemo` hooks in
`Flamegraph` that depend on its properties to directly take those
properties in the deps array.

I noticed there are similar areas of code in `ContinuousFlamegraph` but
don't know of any similar issues around them. So I held off changing
them.

Example flamegraph I've used to reproduce the issue:
https://sentry-32x8jq18g.sentry.dev/explore/profiling/profile/sentry/b983eba8593e4830a0d1eb250c18ab34/flamegraph/?colorCoding=by%20system%20vs%20application%20frame&fov=9142325%2C55%2C37698432%2C23&query=&sorting=call%20order&tid=132495722907328&view=top%20down

Fixes EXP-928.
JoshuaKGoldberg added a commit that referenced this pull request May 5, 2026
…deps for continuousFlamegraph too (#114855)

#114757, but for our other flamegraphs too.

See https://sentry.slack.com/archives/C02MYEFL2Q7/p1776817225888929 for
a reproduction link in production.

Fixes EXP-928.
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.

2 participants