From 94b61eea81d47a17ed5d818c5829f7b723cc3ec4 Mon Sep 17 00:00:00 2001
From: xaralis <filip.varecha@fragaria.cz>
Date: Sun, 3 Jan 2021 16:22:03 +0100
Subject: [PATCH] feat: sentry perf tracing

---
 package-lock.json | 44 ++++++++++++++++++++++++++++++++++++++++++++
 package.json      |  2 ++
 public/index.html |  8 ++++----
 src/App.jsx       |  5 ++++-
 4 files changed, 54 insertions(+), 5 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 84a988e..33f2bb3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1464,6 +1464,17 @@
         "tslib": "^1.9.3"
       }
     },
+    "@sentry/integrations": {
+      "version": "5.29.2",
+      "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-5.29.2.tgz",
+      "integrity": "sha512-bH50B0xubbHrJFq8xZRxOc5BgXe1PXKfC0OqQkhhSd+Bu2WDLCHcn0CEzV+8thZTYkipAoFAFJNdEWcsM2Wcew==",
+      "requires": {
+        "@sentry/types": "5.29.2",
+        "@sentry/utils": "5.29.2",
+        "localforage": "1.8.1",
+        "tslib": "^1.9.3"
+      }
+    },
     "@sentry/minimal": {
       "version": "5.29.2",
       "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.29.2.tgz",
@@ -1487,6 +1498,18 @@
         "tslib": "^1.9.3"
       }
     },
+    "@sentry/tracing": {
+      "version": "5.29.2",
+      "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-5.29.2.tgz",
+      "integrity": "sha512-iumYbVRpvoU3BUuIooxibydeaOOjl5ysc+mzsqhRs2NGW/C3uKAsFXdvyNfqt3bxtRQwJEhwJByLP2u3pLThpw==",
+      "requires": {
+        "@sentry/hub": "5.29.2",
+        "@sentry/minimal": "5.29.2",
+        "@sentry/types": "5.29.2",
+        "@sentry/utils": "5.29.2",
+        "tslib": "^1.9.3"
+      }
+    },
     "@sentry/types": {
       "version": "5.29.2",
       "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.29.2.tgz",
@@ -7153,6 +7176,11 @@
       "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
       "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg=="
     },
+    "immediate": {
+      "version": "3.0.6",
+      "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
+      "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
+    },
     "immer": {
       "version": "7.0.15",
       "resolved": "https://registry.npmjs.org/immer/-/immer-7.0.15.tgz",
@@ -8492,6 +8520,14 @@
         "type-check": "~0.3.2"
       }
     },
+    "lie": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
+      "integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=",
+      "requires": {
+        "immediate": "~3.0.5"
+      }
+    },
     "lines-and-columns": {
       "version": "1.1.6",
       "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
@@ -8584,6 +8620,14 @@
         }
       }
     },
+    "localforage": {
+      "version": "1.8.1",
+      "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.8.1.tgz",
+      "integrity": "sha512-azSSJJfc7h4bVpi0PGi+SmLQKJl2/8NErI+LhJsrORNikMZnhaQ7rv9fHj+ofwgSHrKRlsDCL/639a6nECIKuQ==",
+      "requires": {
+        "lie": "3.1.1"
+      }
+    },
     "locate-path": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
diff --git a/package.json b/package.json
index 51d186e..0330bd1 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,9 @@
     "@react-keycloak/web": "^2.1.4",
     "@rooks/use-interval": "^4.5.0",
     "@rooks/use-window-size": "^4.5.0",
+    "@sentry/integrations": "^5.29.2",
     "@sentry/react": "^5.29.2",
+    "@sentry/tracing": "^5.29.2",
     "classnames": "^2.2.6",
     "crypto-js": "^3.3.0",
     "date-fns": "^2.16.1",
diff --git a/public/index.html b/public/index.html
index 6e3d8c0..67c161f 100644
--- a/public/index.html
+++ b/public/index.html
@@ -16,10 +16,10 @@
     <meta name="theme-color" content="#000000" />
     <meta property="og:url" content="https://cf2021.pirati.cz/" />
     <meta property="og:type" content="website" />
-    <meta property="og:title" content="CF 2021" />
-    <meta property="og:image" content="/img/og.png" />
-    <meta property="og:description" content="Oficiální stránka letošního ročníku Celostátního fóra České pirátské strany." />
-    <meta name="description" content="Oficiální stránka letošního ročníku Celostátního fóra České pirátské strany." />
+    <meta property="og:title" content="CF 2021 | Pirátská strana" />
+    <meta property="og:image" content="https://cf2021.pirati.cz/img/og.png" />
+    <meta property="og:description" content="Oficiální stránka letošního ročníku on-line zasedání Celostátního fóra České pirátské strany, 9. 1. 2021." />
+    <meta name="description" content="Oficiální stránka letošního ročníku on-line zasedání Celostátního fóra České pirátské strany, 9. 1. 2021." />
 
     <title>CF 2021 | Pirátská strana</title>
     <!--
diff --git a/src/App.jsx b/src/App.jsx
index 6fd6b79..e9c7faa 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -2,7 +2,9 @@ import React, { Suspense } from "react";
 import { Helmet, HelmetProvider } from "react-helmet-async";
 import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
 import { KeycloakProvider } from "@react-keycloak/web";
+import { ExtraErrorData } from "@sentry/integrations/dist/extraerrordata";
 import * as Sentry from "@sentry/react";
+import { Integrations } from "@sentry/tracing";
 
 import { loadConfig } from "actions/global-info";
 import { loadMe } from "actions/users";
@@ -26,6 +28,7 @@ if (process.env.REACT_APP_SENTRY_DSN) {
   Sentry.init({
     dsn: process.env.REACT_APP_SENTRY_DSN,
     tracesSampleRate: 0.1,
+    integrations: [new ExtraErrorData(), new Integrations.BrowserTracing()],
   });
 }
 
@@ -93,7 +96,7 @@ const BaseApp = () => {
             name="description"
             content="Oficiální stránka letošního ročníku on-line zasedání Celostátního fóra České pirátské strany, 9. 1. 2021."
           />
-          <meta property="og:title" content="CF 2021" />
+          <meta property="og:title" content="CF 2021 | Pirátská strana" />
           <meta
             property="og:description"
             content="Oficiální stránka letošního ročníku on-line zasedání Celostátního fóra České pirátské strany, 9. 1. 2021."
-- 
GitLab