Skip to content

Commit

Permalink
Edgio rum (#338)
Browse files Browse the repository at this point in the history
* Edgio rum

* Prettier
  • Loading branch information
petrvecera authored Jun 1, 2024
1 parent c8b9670 commit 6dcc8c1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 36 deletions.
1 change: 1 addition & 0 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dependencies": {
"@ant-design/icons": "4.7.0",
"@ant-design/plots": "1.2.6",
"@edgio/rum": "^7.0.13",
"@nivo/bar": "0.72.0",
"@nivo/core": "0.72.0",
"@nivo/geo": "0.72.0",
Expand Down
8 changes: 0 additions & 8 deletions packages/web/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>COH2 Game Statistics</title>
<script defer>
function initXdnRum() {
new Edgio.Metrics({
token: "18453231-4f75-4b29-824a-c3c4415b936c",
}).collect();
}
</script>
<script src="https://rum.layer0.co/latest.js" defer onload="initXdnRum()"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
7 changes: 7 additions & 0 deletions packages/web/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import "./index.css";
import Root from "./root";
import analytics from "./analytics";
import "firebase/compat/firestore";
import { Metrics } from "@edgio/rum";

import { firebase } from "./firebase";

firebase.init();
// Initialize Firebase

Expand All @@ -32,3 +34,8 @@ if (process.env.NODE_ENV !== "production" && module.hot) {

// Render our app
renderApp();

// Collect RUM metrics
new Metrics({
token: "cdbeca7f-be87-45d8-a36a-0ba520f1ec5c",
}).collect();
50 changes: 22 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2237,6 +2237,15 @@
enabled "2.0.x"
kuler "^2.0.0"

"@edgio/rum@^7.0.13":
version "7.0.13"
resolved "https://registry.yarnpkg.com/@edgio/rum/-/rum-7.0.13.tgz#95377434b55e8ab90f1d91df7f802d1803f6be8c"
integrity sha512-FBpDX1W2N7NyJ09Fpx8+yCf2usbURAVyFj9lICEMe2L3YHMkdGGW39UpuJvtl0wRDLv0pRl6CyeHcqqaXsgOfg==
dependencies:
lodash.debounce "^4.0.8"
path-to-regexp "^6.2.1"
web-vitals "^3.5.0"

"@electron-forge/[email protected]":
version "7.4.0"
resolved "https://registry.yarnpkg.com/@electron-forge/cli/-/cli-7.4.0.tgz#db16f4bc678d1f6cec8890cdf86041e9c8336350"
Expand Down Expand Up @@ -13632,6 +13641,11 @@ path-to-regexp@^1.7.0, path-to-regexp@^1.8.0:
dependencies:
isarray "0.0.1"

path-to-regexp@^6.2.1:
version "6.2.2"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.2.tgz#324377a83e5049cbecadc5554d6a63a9a4866b36"
integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==

path-type@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73"
Expand Down Expand Up @@ -17140,16 +17154,7 @@ string-natural-compare@^3.0.1:
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -17247,7 +17252,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand All @@ -17261,13 +17266,6 @@ strip-ansi@^3.0.0:
dependencies:
ansi-regex "^2.0.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.0, strip-ansi@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2"
Expand Down Expand Up @@ -18230,6 +18228,11 @@ wcwidth@^1.0.1:
dependencies:
defaults "^1.0.3"

web-vitals@^3.5.0:
version "3.5.2"
resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-3.5.2.tgz#5bb58461bbc173c3f00c2ddff8bfe6e680999ca9"
integrity sha512-c0rhqNcHXRkY/ogGDJQxZ9Im9D19hDihbzSQJrsioex+KnFgmMzBiy57Z1EjkhX/+OjyBpclDCzz2ITtjokFmg==

webidl-conversions@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
Expand Down Expand Up @@ -18777,7 +18780,7 @@ [email protected]:
"@types/trusted-types" "^2.0.2"
workbox-core "6.4.2"

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -18795,15 +18798,6 @@ wrap-ansi@^6.0.1:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.0.1, wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 6dcc8c1

Please sign in to comment.