fix(profiling): use granular transactionResult properties in useMemo deps#114757
Merged
Conversation
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.40% |
nsdeschenes
approved these changes
May 5, 2026
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.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
transactionResultisn't a stable reference each time it's retrieved fromuseProfileTransaction. This switches theuseMemohooks inFlamegraphthat depend on its properties to directly take those properties in the deps array.I noticed there are similar areas of code in
ContinuousFlamegraphbut 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.