Merge pull request #270 from movie-web/jvs-sentry-telemetry

Sentry telemetry
This commit is contained in:
mrjvs 2023-04-21 21:15:14 +02:00 committed by GitHub
commit 0d79a677a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 256 additions and 7 deletions

View File

@ -1,12 +1,14 @@
{
"name": "movie-web",
"version": "3.0.11",
"version": "3.0.12",
"private": true,
"homepage": "https://movie.squeezebox.dev",
"homepage": "https://movie-web.app",
"dependencies": {
"@formkit/auto-animate": "^1.0.0-beta.5",
"@headlessui/react": "^1.5.0",
"@react-spring/web": "^9.7.1",
"@sentry/integrations": "^7.49.0",
"@sentry/react": "^7.49.0",
"@use-gesture/react": "^10.2.24",
"core-js": "^3.29.1",
"crypto-js": "^4.1.1",

View File

@ -1,3 +1,4 @@
import { useTranslation } from "react-i18next";
import { FloatingCardAnchorPosition } from "@/components/popout/positions/FloatingCardAnchorPosition";
import { FloatingCardMobilePosition } from "@/components/popout/positions/FloatingCardMobilePosition";
import { useIsMobile } from "@/hooks/useIsMobile";
@ -133,13 +134,15 @@ export const FloatingCardView = {
action?: React.ReactNode;
backText?: string;
}) {
const { t } = useTranslation();
let left = (
<div
onClick={props.goBack}
className="flex cursor-pointer items-center space-x-2 transition-colors duration-200 hover:text-white"
>
<Icon icon={Icons.ARROW_LEFT} />
<span>{props.backText || "Go back"}</span>
<span>{props.backText || t("videoPlayer.popouts.back")}</span>
</div>
);
if (props.close)

View File

@ -9,6 +9,7 @@ import { registerSW } from "virtual:pwa-register";
import App from "@/setup/App";
import "@/setup/ga";
import "@/setup/sentry";
import "@/setup/i18n";
import "@/setup/index.css";
import "@/backend";

View File

@ -2,3 +2,5 @@ export const APP_VERSION = import.meta.env.PACKAGE_VERSION;
export const DISCORD_LINK = "https://discord.gg/Jhqt4Xzpfb";
export const GITHUB_LINK = "https://github.com/movie-web/movie-web";
export const GA_ID = "G-44YVXRL61C";
export const SENTRY_DSN =
"https://b267ab7d52674c23af4e4e6cf2956251@o4505053491167232.ingest.sentry.io/4505053495296000";

View File

@ -4,12 +4,16 @@ import LanguageDetector from "i18next-browser-languagedetector";
// Languages
import en from "./locales/en/translation.json";
import nl from "./locales/nl/translation.json";
import { captionLanguages } from "./iso6391";
const locales = {
en: {
translation: en,
},
nl: {
translation: nl,
},
};
i18n
// detect user language

View File

@ -217,7 +217,7 @@ export const captionLanguages: CaptionLanguageOption[] = [
id: "none",
englishName: "None",
name: "None",
nativeName: "No caption language selected",
nativeName: "Lorem ipsum",
},
{
id: "aa",

View File

@ -69,6 +69,7 @@
"playbackSpeed": "Playback speed"
},
"popouts": {
"back": "Go back",
"sources": "Sources",
"seasons": "Seasons",
"captions": "Captions",
@ -108,7 +109,7 @@
},
"settings": {
"title": "Settings",
"language":"Language",
"language": "Language",
"captionLanguage": "Caption Language"
},
"v3": {

View File

@ -0,0 +1,128 @@
{
"global": {
"name": "movie-web"
},
"search": {
"loading_series": "We zoeken je favoriete series...",
"loading_movie": "We zoeken je favoriete films...",
"loading": "Aan het zoeken...",
"allResults": "Dat is het!",
"noResults": "We konden helaas niets vinden.",
"allFailed": "Het is niet gelukt de media te laden, probeer het nog eens.",
"headingTitle": "Zoekresultaten",
"bookmarks": "Opgeslagen",
"continueWatching": "Kijk verder",
"title": "Wat wil je graag kijken?",
"placeholder": "Wat wil je graag kijken?"
},
"media": {
"movie": "Film",
"series": "Serie",
"stopEditing": "Stop met bewerken",
"errors": {
"genericTitle": "Oeps, hier ging iets mis!",
"failedMeta": "Het is niet gelukt de meta-informatie op te halen/",
"mediaFailed": "Het is niet gelukt deze media op te halen. Controleer of je een internetverbinding hebt en probeer het nog een keer.",
"videoFailed": "Er ging iets mis tijdens het spelen van deze video. Als dit blijft gebeuren, deel het dan in de <0>Discord server</0> of maak een <1>GitHub issue</1>."
}
},
"seasons": {
"seasonAndEpisode": "S{{season}} A{{episode}}"
},
"notFound": {
"genericTitle": "Pagina niet gevonden",
"backArrow": "Naar de home-pagina",
"media": {
"title": "We konden deze media niet vinden.",
"description": "We konden dit stukje media niet vinden. Het is mogelijk verwijderd, of jij hebt zelf de URL aangepast."
},
"provider": {
"title": "Deze bron is niet langer beschikbaar",
"description": "Deze bron was helaas te instabiel, we hebben hem jammer genoeg uit moeten zetten."
},
"page": {
"title": "Pagina niet gevonden",
"description": "We hebben echt alles geprobeerd, zelfs tijdrijzen; echter hebben we deze pagina helaas niet kunnen vinden."
}
},
"searchBar": {
"movie": "Films",
"series": "Series",
"Search": "Zoeken"
},
"videoPlayer": {
"findingBestVideo": "De beste video voor jou aan het zoeken...",
"noVideos": "Helaas konden we dat filmpje niet vinden",
"loading": "Aan het laden...",
"backToHome": "Naar de home-pagina",
"backToHomeShort": "Terug",
"seasonAndEpisode": "S{{season}} A{{episode}}",
"timeLeft": "Nog {{timeLeft}}",
"finishAt": "Afgelopen om {{timeFinished}}",
"buttons": {
"episodes": "Afleveringen",
"source": "Bron",
"captions": "Ondertiteling",
"download": "Download",
"settings": "Instellingen",
"pictureInPicture": "Beeld-in-beeld",
"playbackSpeed": "Afspeelsnelheid"
},
"popouts": {
"back": "Terug",
"sources": "Bronnen",
"seasons": "Seizoenen",
"captions": "Ondertiteling",
"playbackSpeed": "Afspeelsnelheid",
"customPlaybackSpeed": "Andere snelheden",
"captionPreferences": {
"title": "Instellingen",
"delay": "Vertraging",
"fontSize": "Lettergrootte",
"opacity": "Doorzichtbaarheid",
"color": "Kleur"
},
"episode": "A{{index}} - {{title}}",
"noCaptions": "Geen ondertiteling",
"linkedCaptions": "Gelinkte ondertiteling",
"customCaption": "Eigen ondertiteling",
"uploadCustomCaption": "Ondertiteling uploaden",
"noEmbeds": "We hebben geen filmpjes kunnen vinden voor deze bron.",
"errors": {
"loadingWentWong": "Er ging iets mis tijdens het laden van de afleveringen voor {{seasonTitle}}",
"embedsError": "Er ging iets mis tijdens het laden van de embeds voor dit dingetje dat je waarschijnlijk leuk vindt"
},
"descriptions": {
"sources": "Welke bron wil je graag gebruiken",
"embeds": "Welk filmpje wil je gebruiken?",
"seasons": "Welk seizoen wil je kijken?",
"episode": "Kies een aflevering",
"captions": "Kies een taal voor de ondertiteling",
"captionPreferences": "Pas de ondertiteling aan aan je voorkeuren",
"playbackSpeed": "Pas de afspeelsnelhijd aan"
}
},
"errors": {
"fatalError": "De videospeler is helaas ontploft, rapporteer deze fout op de <0>Discord server</0> of op <1>GitHub</1>."
}
},
"settings": {
"title": "Instellingen",
"language": "Taal",
"captionLanguage": "Taal voor de Ondertiteling"
},
"v3": {
"newSiteTitle": "De nieuwe versie is uit!",
"newDomain": "https://movie-web.app",
"newDomainText": "We gaan binnenkort verhuizen naar een nieuw domein: <0>https://movie-web.app</0>. Pas je bladwijzers aan naar het nieuwe domein, want </b>het oude domein gaat stoppen met werken op {{date}}.</b>",
"tireless": "We hebben mega hard gewerkt aan deze nieuwe versie, dus we hopen dat je er van gaat genieten.",
"leaveAnnouncement": "Let's go!"
},
"casting": {
"casting": "Aan het casten..."
},
"errors": {
"offline": "Controleer je internetverbinding"
}
}

15
src/setup/sentry.tsx Normal file
View File

@ -0,0 +1,15 @@
import * as Sentry from "@sentry/react";
import { CaptureConsole, HttpClient } from "@sentry/integrations";
import { SENTRY_DSN } from "@/setup/constants";
import { conf } from "@/setup/config";
Sentry.init({
dsn: SENTRY_DSN,
release: `movie-web@${conf().APP_VERSION}`,
sampleRate: 0.5,
integrations: [
new Sentry.BrowserTracing(),
new CaptureConsole(),
new HttpClient(),
],
});

View File

@ -1301,6 +1301,80 @@
estree-walker "^2.0.2"
picomatch "^2.3.1"
"@sentry-internal/tracing@7.49.0":
version "7.49.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.49.0.tgz#f589de565370884b9a13f82c98463de9b2d25dcd"
integrity sha512-ESh3+ZneQk/3HESTUmIPNrW5GVPu/HrRJU+eAJJto74vm+6vP7zDn2YV2gJ1w18O/37nc7W/bVCgZJlhZ3cwew==
dependencies:
"@sentry/core" "7.49.0"
"@sentry/types" "7.49.0"
"@sentry/utils" "7.49.0"
tslib "^1.9.3"
"@sentry/browser@7.49.0":
version "7.49.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.49.0.tgz#5ce1cdb8d883c129d9a4e313c08a54c5ada4661b"
integrity sha512-x2DekKkQoY7/dhBzE4J25mdQ978NtPBTVQb+uZqlF/t5mp4K44TAszmPqy8lC/CmVHkp7qcpRGSCIzeboUL4KA==
dependencies:
"@sentry-internal/tracing" "7.49.0"
"@sentry/core" "7.49.0"
"@sentry/replay" "7.49.0"
"@sentry/types" "7.49.0"
"@sentry/utils" "7.49.0"
tslib "^1.9.3"
"@sentry/core@7.49.0":
version "7.49.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.49.0.tgz#340d059f5efeff1a3359fef66d0c8e34e79ac992"
integrity sha512-AlSnCYgfEbvK8pkNluUkmdW/cD9UpvOVCa+ERQswXNRkAv5aDGCL6Ihv6fnIajE++BYuwZh0+HwZUBVKTFzoZg==
dependencies:
"@sentry/types" "7.49.0"
"@sentry/utils" "7.49.0"
tslib "^1.9.3"
"@sentry/integrations@^7.49.0":
version "7.49.0"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.49.0.tgz#e123f687e0abe10d3428027e3879ce231503fc2f"
integrity sha512-qsEVkcZjw+toFGnzsVo+Cozz+hMK9LugzkfJyOFL+CyiEx9MfkEmsvRpZe1ETEWKe/VZylYU27NQzl6UNuAUjw==
dependencies:
"@sentry/types" "7.49.0"
"@sentry/utils" "7.49.0"
localforage "^1.8.1"
tslib "^1.9.3"
"@sentry/react@^7.49.0":
version "7.49.0"
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.49.0.tgz#9a31808d4232d3010019e09d7c706b3d4fe54960"
integrity sha512-s+ROJr1tP9zVBmoOn94JM+fu2TuoJKxkSXTEUOKoQ9P6P5ROzpDqTzHRGk6u4OjZTy5tftRyEqBGM2Iaf9Y+UA==
dependencies:
"@sentry/browser" "7.49.0"
"@sentry/types" "7.49.0"
"@sentry/utils" "7.49.0"
hoist-non-react-statics "^3.3.2"
tslib "^1.9.3"
"@sentry/replay@7.49.0":
version "7.49.0"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.49.0.tgz#c7f16bc3ca0c5911f641738f8894eb596c5da00d"
integrity sha512-UY3bHoBDPOu4Dpq3m3oxNjLrq09NiFVYUfrTN4QOq1Am2SA04XbuCj/YZ+jNVy/NrFtoz9cTovK6oQbNw53jog==
dependencies:
"@sentry/core" "7.49.0"
"@sentry/types" "7.49.0"
"@sentry/utils" "7.49.0"
"@sentry/types@7.49.0":
version "7.49.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.49.0.tgz#2c217091e13dc373682f5be2e9b5baed9d2ae695"
integrity sha512-9yXXh7iv76+O6h2ONUVx0wsL1auqJFWez62mTjWk4350SgMmWp/zUkBxnVXhmcYqscz/CepC+Loz9vITLXtgxg==
"@sentry/utils@7.49.0":
version "7.49.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.49.0.tgz#b1b3a2af52067dd27e660c7c3062a31cdf4b94f9"
integrity sha512-JdC9yGnOgev4ISJVwmIoFsk8Zx0psDZJAj2DV7x4wMZsO6QK+YjC7G3mUED/S5D5lsrkBZ/3uvQQhr8DQI4UcQ==
dependencies:
"@sentry/types" "7.49.0"
tslib "^1.9.3"
"@surma/rollup-plugin-off-main-thread@^2.2.3":
version "2.2.3"
resolved "https://registry.yarnpkg.com/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz#ee34985952ca21558ab0d952f00298ad2190c053"
@ -3143,7 +3217,7 @@ hls.js@^1.0.7:
resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.3.5.tgz#0e8b0799ecf2feb7ba199f5e95f35ba9552e04f4"
integrity sha512-uybAvKS6uDe0MnWNEPnO0krWVr+8m2R0hJ/viql8H3MVK+itq8gGQuIYoFHL3rECkIpNH98Lw8YuuWMKZxp3Ew==
hoist-non-react-statics@^3.1.0:
hoist-non-react-statics@^3.1.0, hoist-non-react-statics@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
@ -3217,6 +3291,11 @@ ignore@^5.2.0:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
immediate@~3.0.5:
version "3.0.6"
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==
import-fresh@^3.0.0, import-fresh@^3.2.1:
version "3.3.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
@ -3642,6 +3721,13 @@ levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
lie@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e"
integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==
dependencies:
immediate "~3.0.5"
lilconfig@^2.0.5, lilconfig@^2.0.6:
version "2.1.0"
resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52"
@ -3652,6 +3738,13 @@ local-pkg@^0.4.2:
resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963"
integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==
localforage@^1.8.1:
version "1.10.0"
resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4"
integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==
dependencies:
lie "3.1.1"
locate-path@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
@ -5021,7 +5114,7 @@ tsconfig-paths@^3.14.1:
minimist "^1.2.6"
strip-bom "^3.0.0"
tslib@^1.8.1:
tslib@^1.8.1, tslib@^1.9.3:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==