Include Sentry tracing and additional indexes.

This commit is contained in:
Patrick Fic
2023-08-23 08:26:18 -07:00
parent ca248f3890
commit 7c6693a959
13 changed files with 40 additions and 27 deletions

View File

@@ -123,5 +123,10 @@
"title": "Release Notes for 1.1.4",
"date": "08/16/2023",
"notes": "Bug Fixes:\r\n- Fix an issue when searching for jobs without an R4P date."
},
"1.1.5": {
"title": "Release Notes for 1.1.5",
"date": "08/23/2023",
"notes": "Bug Fixes:\r\n- Performance improvements."
}
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,2 @@
CREATE INDEX "groupings_type" on
"public"."groupings" using btree ("type");

View File

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

View File

@@ -0,0 +1,2 @@
CREATE INDEX "groupings_effective_date" on
"public"."groupings" using btree ("effective_date");

View File

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

View File

@@ -0,0 +1,2 @@
CREATE INDEX "groupings_end_date" on
"public"."groupings" using btree ("end_date");

View File

@@ -11,6 +11,7 @@
"@sentry/electron": "^4.10.0",
"antd": "^4.23.1",
"apollo-link-logger": "^2.0.0",
"apollo-link-sentry": "^3.2.3",
"chokidar": "^3.5.3",
"dbffile": "^1.8.1",
"dinero.js": "^1.9.1",
@@ -120,4 +121,4 @@
]
}
}
}
}

View File

@@ -1,5 +1,6 @@
import { Button, Col, Collapse, Result, Row, Space } from "antd";
import React from "react";
import * as Sentry from "@sentry/electron";
class ErrorBoundary extends React.Component {
constructor() {
@@ -13,11 +14,13 @@ class ErrorBoundary extends React.Component {
static getDerivedStateFromError(error) {
console.log("ErrorBoundary -> getDerivedStateFromError -> error", error);
Sentry.captureException(error);
return { hasErrored: true, error: error };
}
componentDidCatch(error, info) {
console.log("Exception Caught by Error Boundary.", error, info);
Sentry.captureException(error);
this.setState({ ...this.state, error, info });
}

View File

@@ -7,6 +7,7 @@ import { WebSocketLink } from "@apollo/client/link/ws";
import { getMainDefinition } from "@apollo/client/utilities";
import apolloLogger from "apollo-link-logger";
import { auth } from "../firebase/firebase.utils";
import { SentryLink } from "apollo-link-sentry";
const errorLink = onError(
({ graphQLErrors, networkError, operation, forward }) => {
@@ -106,12 +107,16 @@ const retryLink = new RetryLink({
},
});
const sentryLink = new SentryLink();
const middlewares = [];
if (process.env.NODE_ENV === "development") {
middlewares.push(apolloLogger);
}
middlewares.push(retryLink.concat(errorLink.concat(authLink.concat(link))));
middlewares.push(
sentryLink.concat(retryLink.concat(errorLink.concat(authLink.concat(link))))
);
const cache = new InMemoryCache({});

View File

@@ -2126,17 +2126,6 @@
"@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"
@@ -3270,6 +3259,16 @@ apollo-link-logger@^2.0.0:
resolved "https://registry.yarnpkg.com/apollo-link-logger/-/apollo-link-logger-2.0.0.tgz#3718d8bf89b8c04c988ee6ce8b48bb85789d2003"
integrity sha512-UBiQZM4KAcJokWRsYrMkyqOvWhnHXPEjNhhGMA1D/quHDk8YUjNmnwqf6KQtq8R8qNW3mQx3AeaWWxNRP3Q9+w==
apollo-link-sentry@^3.2.3:
version "3.2.3"
resolved "https://registry.yarnpkg.com/apollo-link-sentry/-/apollo-link-sentry-3.2.3.tgz#6fc40409812d0277f68bfb4902ab468d35d6d557"
integrity sha512-5btf/XOaxdR1+iK+UWD5oxLyi7MIffZmIJYrhaC6PxofTUg8eW8WDMkFcKS1NLw89DEMNHr1cxDli0dnaxb4ig==
dependencies:
deepmerge "^4.2.2"
dot-prop "^6.0.0"
tslib "^2.0.3"
zen-observable-ts "^1.2.5"
app-builder-bin@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0"
@@ -5110,7 +5109,7 @@ dot-prop@^5.2.0:
dependencies:
is-obj "^2.0.0"
dot-prop@^6.0.1:
dot-prop@^6.0.0, dot-prop@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083"
integrity sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==
@@ -8332,13 +8331,6 @@ 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"
@@ -9524,11 +9516,6 @@ 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"
@@ -12105,7 +12092,7 @@ which@^1.3.1:
dependencies:
isexe "^2.0.0"
which@^2.0.1, which@^2.0.2:
which@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1"
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==