Skip to content

Commit

Permalink
Sentry changes for lameta name change
Browse files Browse the repository at this point in the history
  • Loading branch information
hatton committed Mar 21, 2020
1 parent afd7355 commit 8c2deba
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 14 deletions.
14 changes: 10 additions & 4 deletions app/errorHandling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
// Switched to the Browser SDK

import * as Sentry from "@sentry/browser";
import { showReportDialog } from "@sentry/browser";
import userSettingsSingleton from "./UserSettings";

export function initializeSentry(evenIfDevelopmentBuild: boolean = false) {
if (evenIfDevelopmentBuild || process.env.NODE_ENV === "production") {
Sentry.init({
dsn: "https://14749f18cf3c4d828e341593bc1b568e@sentry.io/1300542",
release: require("./package.json").version
dsn: "https://46f4099f6a80454c9e9b4c7f4ed00020@sentry.io/3369701",
release: `${require("./package.json").version}`,

beforeSend(event) {
try {
console.log("Sending " + JSON.stringify(event));
} catch (err) {}
return event;
}
/* This works, but I have it turned off for now because we don't really have a support
plan in place.
Expand All @@ -18,7 +24,7 @@ export function initializeSentry(evenIfDevelopmentBuild: boolean = false) {
// Note that this only will work in the renderer process, it's a noop on the main process
if (event.exception) {
showReportDialog({
title: "We're sorry, laMeta had a problem.",
title: "We're sorry, lameta had a problem.",
subtitle:
"If you'd like to help us get rid of this bug, tell us what happened below.",
subtitle2: "",
Expand Down
16 changes: 16 additions & 0 deletions sentry.README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
Currently using "@sentry/browser" instead of '@sentry/electron' because of bugs long ago, which could be fixed by now.

Note that "onset" was taken as an org, so our actual org id is "onset-org"

From Bash:
export SENTRY_ORG=onset-org
export SENTRY_PROJECT=lameta
export SENTRY_AUTH_TOKEN= (you can use the release only one, but then you can't do `sentry-cli info`, `sentry-cli projects list`, etc)
VERSION=0.8.5
sentry-cli releases new -p lameta $VERSION
sentry-cli releases set-commits $VERSION --commit "onset/lameta@<the commit tag>" --log-level=info
sentry-cli releases files $VERSION upload-sourcemaps ./app/ --rewrite
sentry-cli releases finalize $VERSION

# older notes

Problem: sentry-cli seems to read AUTH from sentry.properties (which is committed and thus low permissions), rather than the key I give it in
`sentry-cli login`.

Expand Down
6 changes: 3 additions & 3 deletions sentry.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
defaults.url=https://sentry.io/
defaults.org=saymorex
defaults.project=saymore-x
defaults.org=lameta
defaults.project=lameta
auth.token=4107e053d2a34cfaa8b2b90e0564d36fc07c30776e3b458bbdabba83cbb6188b
cli.executable=..\\..\\Users\\hatto\\AppData\\Roaming\\nvm\\v8.10.0\\node_modules\\@sentry\\wizard\\node_modules\\@sentry\\cli\\bin\\sentry-cli
cli.executable=d:\bin\sentry-cli
53 changes: 46 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3615,6 +3615,15 @@ caniuse-lite@^1.0.30001027:
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001028.tgz#f2241242ac70e0fa9cda55c2776d32a0867971c2"
integrity sha512-Vnrq+XMSHpT7E+LWoIYhs3Sne8h9lx9YJV3acH3THNCwU/9zV93/ta4xVfzTtnqd3rvnuVpVjE3DFqf56tr3aQ==

capital-case@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/capital-case/-/capital-case-1.0.3.tgz#339bd77e8fab6cf75111d4fca509b3edf7c117c8"
integrity sha512-OlUSJpUr7SY0uZFOxcwnDOU7/MpHlKTZx2mqnDYQFrDudXLFm0JJ9wr/l4csB+rh2Ug0OPuoSO53PqiZBqno9A==
dependencies:
no-case "^3.0.3"
tslib "^1.10.0"
upper-case-first "^2.0.1"

capture-exit@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4"
Expand Down Expand Up @@ -8348,6 +8357,13 @@ lower-case@^1.1.1:
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"
integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw=

lower-case@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.1.tgz#39eeb36e396115cc05e29422eaea9e692c9408c7"
integrity sha512-LiWgfDLLb1dwbFQZsSglpRj+1ctGnayXz3Uv0/WO8n558JycT5fg6zkNcnW0G68Nn0aEldTFeEfmjCfmqry/rQ==
dependencies:
tslib "^1.10.0"

lowercase-keys@^1.0.0, lowercase-keys@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
Expand Down Expand Up @@ -8973,6 +8989,14 @@ no-case@^2.2.0:
dependencies:
lower-case "^1.1.1"

no-case@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.3.tgz#c21b434c1ffe48b39087e86cfb4d2582e9df18f8"
integrity sha512-ehY/mVQCf9BL0gKfsJBvFJen+1V//U+0HQMPrWct40ixE4jnv0bfvxDbWtAHL9EcaPEOJHVVYKoQn1TlZUB8Tw==
dependencies:
lower-case "^2.0.1"
tslib "^1.10.0"

node-fetch-npm@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7"
Expand Down Expand Up @@ -11572,6 +11596,15 @@ send@0.16.2:
range-parser "~1.2.0"
statuses "~1.4.0"

sentence-case@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-3.0.3.tgz#47576e4adff7abf42c63c815b0543c9d2f85a930"
integrity sha512-ZPr4dgTcNkEfcGOMFQyDdJrTU9uQO1nb1cjf+nuzb6FxgMDgKddZOM29qEsB7jvsZSMruLRcL2KfM4ypKpa0LA==
dependencies:
no-case "^3.0.3"
tslib "^1.10.0"
upper-case-first "^2.0.1"

serialize-javascript@^1.4.0:
version "1.6.1"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.6.1.tgz#4d1f697ec49429a847ca6f442a2a755126c4d879"
Expand Down Expand Up @@ -12456,13 +12489,12 @@ tiny-relative-date@^1.3.0:
resolved "https://registry.yarnpkg.com/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07"
integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A==

title-case@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa"
integrity sha1-PhJyFtpY0rxb7PE3q5Ha46fNj6o=
title-case@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/title-case/-/title-case-3.0.2.tgz#9f926a0a42071366f85470572f312c4b647773ab"
integrity sha512-1P5hyjEhJ9Ab0AT8Xbm0z1avwPSgRR6XtFSNCdfo6B7111TTTja+456UZ2ZPkbTbzqBwIpQxp/tazh5UvpJ+fA==
dependencies:
no-case "^2.2.0"
upper-case "^1.0.3"
tslib "^1.10.0"

tmp@0.0.28:
version "0.0.28"
Expand Down Expand Up @@ -12916,7 +12948,14 @@ update-notifier@^3.0.1:
semver-diff "^2.0.0"
xdg-basedir "^3.0.0"

upper-case@^1.0.3, upper-case@^1.1.1:
upper-case-first@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-2.0.1.tgz#32ab436747d891cc20ab1e43d601cb4d0a7fbf4a"
integrity sha512-105J8XqQ+9RxW3l9gHZtgve5oaiR9TIwvmZAMAIZWRHe00T21cdvewKORTlOJf/zXW6VukuTshM+HXZNWz7N5w==
dependencies:
tslib "^1.10.0"

upper-case@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598"
integrity sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=
Expand Down

0 comments on commit 8c2deba

Please sign in to comment.