mirror of
https://github.com/ivabus/gui
synced 2025-04-23 14:07:14 +03:00
sentry environment
This commit is contained in:
parent
f1d9433fa1
commit
2f741d0bdb
3 changed files with 10 additions and 2 deletions
|
@ -17,9 +17,14 @@ import initializePushNotification, {
|
||||||
import init from "./libs/initialize";
|
import init from "./libs/initialize";
|
||||||
import { readSessionData } from "./libs/auth";
|
import { readSessionData } from "./libs/auth";
|
||||||
|
|
||||||
|
import { isDev } from "./libs/auto-updater";
|
||||||
|
|
||||||
log.info("App starting...");
|
log.info("App starting...");
|
||||||
if (app.isPackaged) {
|
if (app.isPackaged) {
|
||||||
|
const dev = isDev();
|
||||||
|
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
|
environment: dev ? "development" : "production",
|
||||||
dsn: "https://5ff29bb5b3b64cd4bd4f4960ef1db2e3@o4504750197899264.ingest.sentry.io/4504750206746624",
|
dsn: "https://5ff29bb5b3b64cd4bd4f4960ef1db2e3@o4504750197899264.ingest.sentry.io/4504750206746624",
|
||||||
debug: true,
|
debug: true,
|
||||||
release: app.getVersion(),
|
release: app.getVersion(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "tea",
|
"name": "tea",
|
||||||
"version": "0.1.5",
|
"version": "0.2.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "tea gui app",
|
"description": "tea gui app",
|
||||||
"author": "tea.xyz",
|
"author": "tea.xyz",
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
import * as Sentry from "@sentry/browser";
|
import * as Sentry from "@sentry/browser";
|
||||||
import type { Session } from "./types";
|
import type { Session } from "./types";
|
||||||
import { isPackaged } from "electron-is-packaged";
|
import { isPackaged } from "electron-is-packaged";
|
||||||
|
import { isDev } from "@native";
|
||||||
|
|
||||||
export function initSentry(session?: Session) {
|
export async function initSentry(session?: Session) {
|
||||||
if (isPackaged) {
|
if (isPackaged) {
|
||||||
|
const dev = await isDev();
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
|
environment: dev ? "development" : "production",
|
||||||
dsn: "https://5ff29bb5b3b64cd4bd4f4960ef1db2e3@o4504750197899264.ingest.sentry.io/4504750206746624"
|
dsn: "https://5ff29bb5b3b64cd4bd4f4960ef1db2e3@o4504750197899264.ingest.sentry.io/4504750206746624"
|
||||||
});
|
});
|
||||||
if (session) {
|
if (session) {
|
||||||
|
|
Loading…
Reference in a new issue