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

Add Sentry performance monitoring and environments #3106

Merged
merged 3 commits into from
Dec 31, 2020

Conversation

taneliang
Copy link
Member

  1. Performance tracing: adds the basic Sentry performance setup. The most valuable data here is the web vitals stuff, but it'll also be the foundation of future tracing for the new GraphQL server as well.

    I've added a Timing-Allow-Origin header to api.nusmods.com so that we can see timing info for it in our traces.

    Sentry do provide a React integration that can log basic React lifecycle info for components wrapped in a withProfiler HoC. However, lifecycle info (i.e. mount, render, update, unmount) for single components isn't very useful, and you'll need to wrap each component of interest individually. I think it may be more useful to build our own React tracer using the user timing marks I helped add to React, which are enabled in experimental profiling builds of React, which will be able to provide timing information on React state updates, suspends, etc, as well as info on effect execution and render and commit phases.

  2. Environments: adds some heuristics to determine an environment.

Screenshots

All links are internal-only.

Environments

image

Performance tab

image

Transaction details

image

@vercel
Copy link

vercel bot commented Dec 31, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

nusmods-website – ./website

🔍 Inspect: https://vercel.com/nusmodifications/nusmods-website/m1kopvw4j
✅ Preview: https://nusmods-website-git-eliang-sentry-performance.nusmodifications.vercel.app

nusmods-export – ./export

🔍 Inspect: https://vercel.com/nusmodifications/nusmods-export/o1v5spcx1
✅ Preview: https://nusmods-export-git-eliang-sentry-performance.nusmodifications.vercel.app

@codecov
Copy link

codecov bot commented Dec 31, 2020

Codecov Report

Merging #3106 (4278a1b) into master (5268d13) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3106      +/-   ##
==========================================
- Coverage   55.58%   55.51%   -0.08%     
==========================================
  Files         255      255              
  Lines        5309     5316       +7     
  Branches     1218     1223       +5     
==========================================
  Hits         2951     2951              
- Misses       2358     2365       +7     
Impacted Files Coverage Δ
website/src/.eslintrc.js 0.00% <ø> (ø)
website/src/bootstrapping/sentry.ts 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5268d13...4278a1b. Read the comment docs.

@nusmods-deploy-bot
Copy link

nusmods-deploy-bot bot commented Dec 31, 2020

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

Successfully merging this pull request may close these issues.

None yet

2 participants