Add sentry and queries.

This commit is contained in:
Patrick Fic
2023-08-18 14:54:19 -07:00
parent ed006c0626
commit ca248f3890
15 changed files with 163 additions and 5 deletions

3
.gitignore vendored
View File

@@ -107,3 +107,6 @@ firebase/.yarn-integrity
# dotenv environment variables file
firebase/.env
.eslintcache
# Sentry Auth Token
.sentryclirc

View File

@@ -15,11 +15,16 @@ const { store } = require("./electron-store");
const { autoUpdater } = require("electron-updater");
const log = require("electron-log");
const contextMenu = require("electron-context-menu");
const Sentry = require("@sentry/electron");
const { set } = require("lodash");
//const Nucleus = require("nucleus-nodejs");
require("./ipc-main-handler");
require("./analytics");
Sentry.init({
dsn: "https://9840e0f304124299e379d9347e12d2e6@o492140.ingest.sentry.io/4505728058523648",
});
autoUpdater.autoDownload = true;
autoUpdater.logger = log;

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."associations_idx_email";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "associations_idx_email" on
"public"."associations" using btree ("email");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."associations_idx_email_shopid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "associations_idx_email_shopid" on
"public"."associations" using btree ("email", "bodyshopid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."users_idx_authid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "users_idx_authid" on
"public"."users" using btree ("authid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."jobs_idx_updated_at";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "jobs_idx_updated_at" on
"public"."jobs" using btree ("updated_at");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."joblines_idx_linno";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "joblines_idx_linno" on
"public"."joblines" using btree ("line_no");

View File

@@ -3,11 +3,12 @@
"productName": "ImEX RPS",
"author": "ImEX Systems Inc. <support@thinkimex.com>",
"description": "ImEX RPS",
"version": "1.1.4",
"version": "1.1.5",
"main": "electron/main.js",
"homepage": "./",
"dependencies": {
"@apollo/client": "^3.6.9",
"@sentry/electron": "^4.10.0",
"antd": "^4.23.1",
"apollo-link-logger": "^2.0.0",
"chokidar": "^3.5.3",
@@ -43,7 +44,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build": "react-scripts build && yarn run sentry:sourcemaps",
"test": "react-scripts test",
"eject": "react-scripts eject",
"dev": "concurrently -k \"npm start\" \"npm:electron\"",
@@ -52,7 +53,8 @@
"dist": "npm run build && electron-builder",
"distp": "npm run build && electron-builder --publish always",
"distpnb": "lectron-builder --publish always",
"postinstall": "electron-builder install-app-deps"
"postinstall": "electron-builder install-app-deps",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org imex --project rps ./build && sentry-cli sourcemaps upload --org imex --project rps ./build"
},
"eslintConfig": {
"extends": "react-app"
@@ -118,4 +120,4 @@
]
}
}
}
}

View File

@@ -9,6 +9,15 @@ import App from "./App/App";
import "./index.css";
import { persistor, store } from "./redux/store";
import * as Sentry from "@sentry/electron";
Sentry.init({
dsn: "https://9840e0f304124299e379d9347e12d2e6@o492140.ingest.sentry.io/4505728058523648",
integrations: [new Sentry.BrowserTracing()],
tracesSampleRate: 1.0,
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", "https://db.rps.imex.online"],
});
//if (process.env.NODE_ENV === "production") LogRocket.init("imex/rps");
const container = document.getElementById("root");
const root = createRoot(container); // createRoot(container!) if you use TypeScript

126
yarn.lock
View File

@@ -2104,6 +2104,98 @@
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.1.4.tgz#0c8b74c50f29ee44f423f7416829c0bf8bb5eb27"
integrity sha512-LwzQKA4vzIct1zNZzBmRKI9QuNpLgTQMEjsQLf3BXuGYb3QPTP4Yjf6mkdX+X1mYttZ808QpOwAzZjv28kq7DA==
"@sentry-internal/tracing@7.63.0":
version "7.63.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.63.0.tgz#58903b2205456034611cc5bc1b5b2479275f89c7"
integrity sha512-Fxpc53p6NGvLSURg3iRvZA0k10K9yfeVhtczvJnpX30POBuV41wxpkLHkb68fjksirjEma1K3Ut1iLOEEDpPQg==
dependencies:
"@sentry/core" "7.63.0"
"@sentry/types" "7.63.0"
"@sentry/utils" "7.63.0"
tslib "^2.4.1 || ^1.9.3"
"@sentry/browser@7.63.0":
version "7.63.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.63.0.tgz#d7eee4be7bfff015f050bca83cafb111dc13d40d"
integrity sha512-P1Iw/2281C/7CUCRsN4jgXvjMNKnrwKqxRg7JqN8eVeCDPMpOeEPHNJ6YatEXdVLTKVn0JB7L63Q1prhFr8+SQ==
dependencies:
"@sentry-internal/tracing" "7.63.0"
"@sentry/core" "7.63.0"
"@sentry/replay" "7.63.0"
"@sentry/types" "7.63.0"
"@sentry/utils" "7.63.0"
tslib "^2.4.1 || ^1.9.3"
"@sentry/cli@^2.20.5":
version "2.20.5"
resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.20.5.tgz#255a5388ca24c211a0eae01dcc4ad813a7ff335a"
integrity sha512-ZvWb86eF0QXH9C5Mbi87aUmr8SH848yEpXJmlM2AoBowpE9kKDnewCAKvyXUihojUFwCSEEjoJhrRMMgmCZqXA==
dependencies:
https-proxy-agent "^5.0.0"
node-fetch "^2.6.7"
progress "^2.0.3"
proxy-from-env "^1.1.0"
which "^2.0.2"
"@sentry/core@7.63.0":
version "7.63.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.63.0.tgz#8c38da6ef3a1de6e364463a09bc703b196ecbba4"
integrity sha512-13Ljiq8hv6ieCkO+Am99/PljYJO5ynKT/hRQrWgGy9IIEgUr8sV3fW+1W6K4/3MCeOJou0HsiGBjOD1mASItVg==
dependencies:
"@sentry/types" "7.63.0"
"@sentry/utils" "7.63.0"
tslib "^2.4.1 || ^1.9.3"
"@sentry/electron@^4.10.0":
version "4.10.0"
resolved "https://registry.yarnpkg.com/@sentry/electron/-/electron-4.10.0.tgz#5701104d8355a223c7cf5b9c52cfca61e2f89b5c"
integrity sha512-pXJ7apSxH5buAB5yocbLr/KkBKS2AJ4Nj3gjzFyxkHYeIZr0BM44qZMy1bNM96abPUPak0oVcoB0ckL/K0c6mA==
dependencies:
"@sentry/browser" "7.63.0"
"@sentry/core" "7.63.0"
"@sentry/node" "7.63.0"
"@sentry/types" "7.63.0"
"@sentry/utils" "7.63.0"
deepmerge "4.3.0"
lru_map "^0.3.3"
tslib "^2.5.0"
"@sentry/node@7.63.0":
version "7.63.0"
resolved "https://registry.yarnpkg.com/@sentry/node/-/node-7.63.0.tgz#38508a440c04c0e98d00f5a1855e5448ee70c8d6"
integrity sha512-tSMyfQNbfjX1w8vJDZtvWeaD4QQ/Z4zVW/TLXfL/JZFIIksPgDZmqLdF+NJS4bSGTU5JiHiUh4pYhME4mHgNBQ==
dependencies:
"@sentry-internal/tracing" "7.63.0"
"@sentry/core" "7.63.0"
"@sentry/types" "7.63.0"
"@sentry/utils" "7.63.0"
cookie "^0.4.1"
https-proxy-agent "^5.0.0"
lru_map "^0.3.3"
tslib "^2.4.1 || ^1.9.3"
"@sentry/replay@7.63.0":
version "7.63.0"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.63.0.tgz#989ae32ea028a5eca323786cc07294fedb1f0d45"
integrity sha512-ikeFVojuP9oDF103blZcj0Vvb4S50dV54BESMrMW2lYBoMMjvOd7AdL+iDHjn1OL05/mv1C6Oc8MovmvdjILVA==
dependencies:
"@sentry/core" "7.63.0"
"@sentry/types" "7.63.0"
"@sentry/utils" "7.63.0"
"@sentry/types@7.63.0":
version "7.63.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.63.0.tgz#8032029fee6f70e04b667646626a674b03e2f79b"
integrity sha512-pZNwJVW7RqNLGuTUAhoygt0c9zmc0js10eANAz0MstygJRhQI1tqPDuiELVdujPrbeL+IFKF+7NvRDAydR2Niw==
"@sentry/utils@7.63.0":
version "7.63.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.63.0.tgz#7c598553b4dbb6e3740dc96bc7f112ec32edbe69"
integrity sha512-7FQv1RYAwnuTuarruP+1+Jd6YQuN7i/Y7KltwPMVEwU7j5mzYQaexLr/Jz1XIdR2KYVdkbXQyP8jj8BmA6u9Jw==
dependencies:
"@sentry/types" "7.63.0"
tslib "^2.4.1 || ^1.9.3"
"@sideway/address@^4.1.3":
version "4.1.4"
resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0"
@@ -4258,6 +4350,11 @@ cookie@0.5.0:
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b"
integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==
cookie@^0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432"
integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==
copy-to-clipboard@^3.2.0:
version "3.3.2"
resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.2.tgz#5b263ec2366224b100181dded7ce0579b340c107"
@@ -4708,6 +4805,11 @@ deep-is@^0.1.3, deep-is@~0.1.3:
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831"
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
deepmerge@4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.0.tgz#65491893ec47756d44719ae520e0e2609233b59b"
integrity sha512-z2wJZXrmeHdvYJp/Ux55wIjqo81G5Bp4c+oELTW+7ar6SogWHajt5a9gO3s3IDaGSAXjDk0vlQKN3rms8ab3og==
deepmerge@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
@@ -7936,6 +8038,11 @@ 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 sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ==
magic-string@^0.25.0, magic-string@^0.25.7:
version "0.25.9"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.9.tgz#de7f9faf91ef8a1c91d02c2e5314c8277dbcdd1c"
@@ -8225,6 +8332,13 @@ node-fetch@2.6.7:
dependencies:
whatwg-url "^5.0.0"
node-fetch@^2.6.7:
version "2.6.13"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.13.tgz#a20acbbec73c2e09f9007de5cda17104122e0010"
integrity sha512-StxNAxh15zr77QvvkmveSQ8uCQ4+v5FkvNTj0OESmiHu+VRi/gXArXtkWMElOsOUNLtUEvI4yS+rdtOHZTwlQA==
dependencies:
whatwg-url "^5.0.0"
node-forge@^1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3"
@@ -9410,6 +9524,11 @@ proxy-addr@~2.0.7:
forwarded "0.2.0"
ipaddr.js "1.9.1"
proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
psl@^1.1.33:
version "1.9.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7"
@@ -11432,6 +11551,11 @@ tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
"tslib@^2.4.1 || ^1.9.3", tslib@^2.5.0:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
@@ -11981,7 +12105,7 @@ which@^1.3.1:
dependencies:
isexe "^2.0.0"
which@^2.0.1:
which@^2.0.1, which@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==