Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tenderly urls to sentry metadata #1085

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Conversation

agualis
Copy link
Contributor

@agualis agualis commented Sep 12, 2024

Adds tenderly simulation urls to sentry metadata for the main flows: add, remove and swap (for both simulation and execution errors).

How to test? (Swap example)

Comment this line to avoid form input validation:
https://github.com/balancer/frontend-v3/blob/feat/sentryTenderlyUrl/lib/modules/swap/SwapProvider.tsx#L535

Swap with token amount in greater than the wallet balance:

balanceForcedSwapError

Open the modal and the simulation should fail:

balanceForcedSwapError2

You will see a "Sentry capturing query error:" in the console:

console

It should contain a valid tenderly url in meta.context.extra.tenderlyUrl.

If sentry capturing was enabled (disabled by default in dev) you would see an issue like this one:
https://balancer-labs.sentry.io/issues/5837469276

Then you can open the tenderly url and simulate from the sentry issue 🎈

@agualis agualis self-assigned this Sep 12, 2024
Copy link

vercel bot commented Sep 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
frontend-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2024 11:04am
test-v3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 13, 2024 11:04am

@@ -22,6 +22,22 @@ export const queryClient = new QueryClient({
captureError(error, { extra: { queryKey: query.queryKey } })
},
}),
mutationCache: new MutationCache({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated to tenderly but we were not explicitly capturing mutation errors (they are not frequent as the tx normally fails in the simulation, not in the execution).

Copy link
Contributor

@garethfuller garethfuller left a comment

Choose a reason for hiding this comment

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

Has conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants