Skip to content

Commit

Permalink
feat: add sentry (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardocasares authored Feb 10, 2021
1 parent e45d7a0 commit 8421ddc
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 5 deletions.
11 changes: 7 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
module.exports = {
reactStrictMode: true,
productionBrowserSourceMaps: true,
i18n: {
locales: ["en", "es", "pl", "fr", "ru"],
defaultLocale: "en",
},
experimental: {
plugins: true,
},
env: {
NEXT_PUBLIC_SHA: process.env.VERCEL_GIT_COMMIT_SHA,
NEXT_PUBLIC_SENTRY_DSN: process.env.SENTRY_DSN,
NEXT_PUBLIC_SENTRY_RELEASE: process.env.VERCEL_GIT_COMMIT_SHA,
NEXT_PUBLIC_GA_TRACKING_ID: process.env.NEXT_PUBLIC_GA_TRACKING_ID,
},
experimental: {
plugins: true
},
reactStrictMode: true
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@geist-ui/react-icons": "^1.0.0",
"@gqless/react": "^1.0.0-alpha.31",
"@next/plugin-google-analytics": "^10.0.6",
"@next/plugin-sentry": "ricardocasares/next-plugin-sentry",
"@vercel/fetch": "^6.1.0",
"apollo-server-micro": "^2.20.0",
"debounce": "^1.2.0",
Expand Down
4 changes: 4 additions & 0 deletions src/pages/playground.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Box } from "@/components/Box";
import { memo, useCallback, useState } from "react";
// Generates random colours any time it's called
const randomColour = () => "#" + ((Math.random() * 0xffffff) << 0).toString(16);
Expand Down Expand Up @@ -26,6 +27,8 @@ export const Playground = () => {
functions.add(incrementDelta);
functions.add(increment);

const crash = () => { throw new Error('Simulated app crash'); };

return (
<div>
<div> Delta is {delta} </div>
Expand All @@ -34,6 +37,7 @@ export const Playground = () => {
<div>
<Button onClick={incrementDelta}>Increment Delta</Button>
<Button onClick={increment}>Increment Counter</Button>
<Button onClick={crash}>Crash</Button>
</div>
<br />
<div> Newly Created Functions: {functions.size - 2} </div>
Expand Down
128 changes: 127 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,15 @@
resolved "https://registry.yarnpkg.com/@next/plugin-google-analytics/-/plugin-google-analytics-10.0.6.tgz#64047f2210ae0efe3c12463b82d202d668ac4d07"
integrity sha512-4RiwjC9LlNakcRFJRub988G3UUIi7z/mZtVCfHbaEGhQyQPui59KvKj/1eW9MYrO94NK/10ObxUfI6dVM8GhOA==

"@next/plugin-sentry@ricardocasares/next-plugin-sentry":
version "10.0.6"
resolved "https://codeload.github.com/ricardocasares/next-plugin-sentry/tar.gz/35963363f3b8d8ae8797c685d6b9ef7f963f90d2"
dependencies:
"@sentry/browser" "5.27.0"
"@sentry/integrations" "5.27.0"
"@sentry/minimal" "5.27.0"
"@sentry/node" "5.27.0"

"@next/polyfill-module@10.0.6":
version "10.0.6"
resolved "https://registry.yarnpkg.com/@next/polyfill-module/-/polyfill-module-10.0.6.tgz#9d4c651456d90b5bafb3d9a3a93100d309d47746"
Expand Down Expand Up @@ -1404,6 +1413,94 @@
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=

"@sentry/browser@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.27.0.tgz#35b77f076fb5f08c91eff23f3c067ee15df0ab90"
integrity sha512-AByUVSy5YctTxWGA6HaeTkZXDCmHbeurqLkR6U9h4HzEHZq3laxrYQ1HiWcaW1IgFDqZcEmD14kDOVY4GhF3QQ==
dependencies:
"@sentry/core" "5.27.0"
"@sentry/types" "5.27.0"
"@sentry/utils" "5.27.0"
tslib "^1.9.3"

"@sentry/core@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.27.0.tgz#661b2fd1beecaa37c013a6c364330fa29c847b3c"
integrity sha512-ddvAxVszsHzFzGedii1NxfKU3GxAEGJV5eXNlA2hqS0/OKl+IOjuI6aJjg55LMTEEejqr9djXqDMk6y5av6UKg==
dependencies:
"@sentry/hub" "5.27.0"
"@sentry/minimal" "5.27.0"
"@sentry/types" "5.27.0"
"@sentry/utils" "5.27.0"
tslib "^1.9.3"

"@sentry/hub@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.27.0.tgz#dcd7b36d216997f0283bd3334cbce8004d56ef89"
integrity sha512-Qe4nndgDEY8n3kKEWJTw5M201dgsoB9ZQ10483cVpGCtOfZZuzXEr4EaLG3BefH8YFvlgUP3YlxD7XFoJioRjg==
dependencies:
"@sentry/types" "5.27.0"
"@sentry/utils" "5.27.0"
tslib "^1.9.3"

"@sentry/integrations@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-5.27.0.tgz#8760bd0827db07fc72f90026d64df88e653a9e28"
integrity sha512-iIphS8b/wz4RXzYd09eGnf5FuJzqAYo55NDPBpH2bN0hnIgshVFvRJe1rbo2sA+r8u+ODLvc3b6jvXB4gBupzA==
dependencies:
"@sentry/types" "5.27.0"
"@sentry/utils" "5.27.0"
localforage "1.8.1"
tslib "^1.9.3"

"@sentry/minimal@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.27.0.tgz#8c2fdcf9cd1e59d8ff1848a7905bac304f8e206b"
integrity sha512-KidWjo2jNd8IwPhEIDC0YddjwuIdVxTEsmpRkZ6afuiR5rMQsiqA0EwsndWiAjs67qxQRj/VD/1Xghxe0nHzXQ==
dependencies:
"@sentry/hub" "5.27.0"
"@sentry/types" "5.27.0"
tslib "^1.9.3"

"@sentry/node@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.27.0.tgz#5fdf377eb66140ddb405b48f23a9354d2e24fa98"
integrity sha512-Fsl6gkRKB2rnJCp32Vo5lhFOSZ32QxGRvWWddLJo/WrndAQbz17Rk+rdF3c6WTvnC9VBGZi7jEzIphpna4XcQg==
dependencies:
"@sentry/core" "5.27.0"
"@sentry/hub" "5.27.0"
"@sentry/tracing" "5.27.0"
"@sentry/types" "5.27.0"
"@sentry/utils" "5.27.0"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^1.9.3"

"@sentry/tracing@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.27.0.tgz#133b03a02640a0d63d11f341a00e96315c9d0303"
integrity sha512-h82VmO4loeWd5bMFgNWBO+eY6bEpPt5iRc1YZouC10fouhlzw2O4p2A4n1/rVQ+eIKAsfkkgsjEuKBnTPxDAsw==
dependencies:
"@sentry/hub" "5.27.0"
"@sentry/minimal" "5.27.0"
"@sentry/types" "5.27.0"
"@sentry/utils" "5.27.0"
tslib "^1.9.3"

"@sentry/types@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.27.0.tgz#cea288d02c727ef83541768b8738e6a829dfc831"
integrity sha512-coB2bMDxmzTwIWcXbzbnE2JtEqDkvmK9+KyZZNI/Mk3wwabFYqL7hOnqXB45/+hx+6l9/siWmB1l5um3tzqdOw==

"@sentry/utils@5.27.0":
version "5.27.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.27.0.tgz#21c15401b43041b1208521465c09c64eafc2e0ff"
integrity sha512-XrdoxOsjqF9AVmeCefNgY0r3lvZBj34bzsG3TI8Z1bjQKB3iF/2yAI/bdo+sUqAiJiiPSk5p6SiPkyeTsSdBhg==
dependencies:
"@sentry/types" "5.27.0"
tslib "^1.9.3"

"@sindresorhus/is@^2.0.0":
version "2.1.1"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-2.1.1.tgz#ceff6a28a5b4867c2dd4a1ba513de278ccbe8bb1"
Expand Down Expand Up @@ -2837,6 +2934,11 @@ convert-source-map@1.7.0, convert-source-map@^1.5.0, convert-source-map@^1.7.0:
dependencies:
safe-buffer "~5.1.1"

cookie@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1"
integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==

copy-descriptor@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
Expand Down Expand Up @@ -4090,7 +4192,7 @@ https-browserify@^1.0.0:
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"
integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=

https-proxy-agent@5.0.0:
https-proxy-agent@5.0.0, https-proxy-agent@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2"
integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==
Expand Down Expand Up @@ -4144,6 +4246,11 @@ ignore@^5.1.1, ignore@^5.1.4:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57"
integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==

immediate@~3.0.5:
version "3.0.6"
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=

import-fresh@^3.1.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
Expand Down Expand Up @@ -4604,6 +4711,13 @@ kind-of@^6.0.0, kind-of@^6.0.2:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==

lie@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e"
integrity sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=
dependencies:
immediate "~3.0.5"

line-column@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/line-column/-/line-column-1.0.2.tgz#d25af2936b6f4849172b312e4792d1d987bc34a2"
Expand Down Expand Up @@ -4633,6 +4747,13 @@ loader-utils@1.2.3:
emojis-list "^2.0.0"
json5 "^1.0.1"

localforage@1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.8.1.tgz#f6c0a24b41ab33b10e4dc84342dd696f6f3e3433"
integrity sha512-azSSJJfc7h4bVpi0PGi+SmLQKJl2/8NErI+LhJsrORNikMZnhaQ7rv9fHj+ofwgSHrKRlsDCL/639a6nECIKuQ==
dependencies:
lie "3.1.1"

locate-path@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e"
Expand Down Expand Up @@ -4734,6 +4855,11 @@ lru-cache@6.0.0, lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"

lru_map@^0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd"
integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=

make-dir@^3.0.0, make-dir@^3.0.2:
version "3.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
Expand Down

1 comment on commit 8421ddc

@vercel
Copy link

@vercel vercel bot commented on 8421ddc Feb 10, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.