Skip to content

Commit

Permalink
removed posthog and sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
jaensen committed Jul 27, 2023
1 parent 6b18cee commit 14cb9d0
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 128 deletions.
3 changes: 0 additions & 3 deletions shell/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ let _routes = {
<Router
routes="{_routes}"
on:routeLoaded="{(e) => {
window.o.posthog?.capture('routeLoaded', {
route: e.detail.route
});
if (!ubiMachineInterpreter && $me && $me.circlesAddress) {
ubiMachineInterpreter = interpret(ubiMachine)
.onEvent((event) => {
Expand Down
2 changes: 0 additions & 2 deletions shell/src/iShell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import { PlatformEvent } from "@o-platform/o-events/dist/platformEvent";
import { Process } from "@o-platform/o-process/dist/interfaces/process";
import { ProcessContext } from "@o-platform/o-process/dist/interfaces/processContext";
import { ProcessDefinition } from "@o-platform/o-process/dist/interfaces/processManifest";
import { PostHog } from "posthog-js";
import { Subject } from "rxjs";
import { ApiConnection } from "./shared/apiConnection";

export interface IShell {
posthog?: PostHog;
bip39: {
mnemonicToSeed: any;
mnemonicToEntropy: any;
Expand Down
22 changes: 0 additions & 22 deletions shell/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,12 @@ import {ApiConnection} from "./shared/apiConnection";
import {Stopped} from "@o-platform/o-process/dist/events/stopped";
import {Environment} from "./shared/environment";
import {IShell} from "./iShell";
import * as Sentry from "@sentry/browser";
import {BrowserTracing} from "@sentry/tracing";
import * as bip39 from "bip39";
import posthog from 'posthog-js'

const i18nString = get(_);

setupI18n({ withLocale: Environment.userLanguage.slice(0, 2) });

Sentry.init({
dsn: "https://42e2eed7fcd94a3f86fa2ca4ffa7bd70@o4504719125905408.ingest.sentry.io/4504719127740416",
integrations: [new BrowserTracing(), new Sentry.Replay()],

// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 1.0,
// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
});


dayjs.extend(relativeTime);
RpcGateway.setup(Environment.xdaiRpcGatewayUrl);

Expand Down Expand Up @@ -111,7 +90,6 @@ const runningProcesses: {


window.o = <any>{
posthog: Environment.apiEndpointUrl.indexOf("localhost") == -1 ? posthog.init(Environment.posthogId, { api_host: Environment.posthogUrl }) : undefined,
bip39: {
mnemonicToSeed: (mnemonic: string) => bip39.mnemonicToSeed(mnemonic),
mnemonicToEntropy: (mnemonic: string) => bip39.mnemonicToEntropy(mnemonic),
Expand Down
4 changes: 2 additions & 2 deletions shell/src/shared/apiConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {getMainDefinition} from 'apollo-utilities';
import {DocumentNode, OperationDefinitionNode} from "graphql/language/ast";
import {
AggregatesDocument,
AggregateType, CreateTagInput, ProfileAggregate,
AggregateType, ProfileAggregate,
ProfileAggregateFilter,
QueryAggregatesArgs
} from "./api/data/types";
Expand Down Expand Up @@ -208,4 +208,4 @@ export class ApiConnection
defaultOptions: ApiConnection._defaultOptions
});
}
}
}
8 changes: 0 additions & 8 deletions shell/src/shared/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ export class Environment {
return "__HERE_API_KEY__";
}

public static get posthogId(): string {
return "phc_Mss3qel6SM45x6jVDUBcr3AMEKbmWcmcpqM5Dtl9Gn";
}

public static get posthogUrl(): string {
return "https://eu.posthog.com";
}

public static get userLanguage(): string {
if (localStorage.getItem("userLanguage")) {
return localStorage.getItem("userLanguage");
Expand Down
91 changes: 0 additions & 91 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3277,8 +3277,6 @@ __metadata:
"@o-platform/o-interfaces": 0.1.0
"@o-platform/o-process": 0.1.0
"@o-platform/o-utils": 0.1.0
"@sentry/browser": ^7.38.0
"@sentry/tracing": ^7.38.0
"@tailwindcss/typography": ^0.5.7
"@toruslabs/openlogin": ^3.2.1
"@toruslabs/openlogin-ed25519": ^4.2.0
Expand Down Expand Up @@ -3323,7 +3321,6 @@ __metadata:
postcss-loader: ^7.0.2
postcss-mixins: ^9.0.4
postcss-preset-env: ^8.0.1
posthog-js: ^1.52.0
qr-code-styling: ^1.6.0-rc.1
qr-scanner: ^1.4.2
quill: ^1.3.7
Expand Down Expand Up @@ -3434,70 +3431,6 @@ __metadata:
languageName: node
linkType: hard

"@sentry/browser@npm:^7.38.0":
version: 7.38.0
resolution: "@sentry/browser@npm:7.38.0"
dependencies:
"@sentry/core": 7.38.0
"@sentry/replay": 7.38.0
"@sentry/types": 7.38.0
"@sentry/utils": 7.38.0
tslib: ^1.9.3
checksum: 9ff6dcdb79bd4d630ab2d351fec82a60f6f7276cfcd96f0dda8e7cfd3d2881fdaca1b484a49b8606649698b767267d7ea1561d925a1622610b9501576f4c77b5
languageName: node
linkType: hard

"@sentry/core@npm:7.38.0":
version: 7.38.0
resolution: "@sentry/core@npm:7.38.0"
dependencies:
"@sentry/types": 7.38.0
"@sentry/utils": 7.38.0
tslib: ^1.9.3
checksum: afa7325e076863403f48aaad5e11265a33205a576fa5e7a4ef9bff77259c0039f825daaeedc82ef5060a12bf4c298c2c84bb65ba2640dc81c65c57d470a4eb90
languageName: node
linkType: hard

"@sentry/replay@npm:7.38.0":
version: 7.38.0
resolution: "@sentry/replay@npm:7.38.0"
dependencies:
"@sentry/core": 7.38.0
"@sentry/types": 7.38.0
"@sentry/utils": 7.38.0
checksum: edc2ac620d0f6d4a4c35b42c53c69edc018b7b206bf45274b8a9d3f3dc2e083b9454b555c0183f517515a5ca4fc861222e63cdbfc1fe8f2cd3c7067a598f607f
languageName: node
linkType: hard

"@sentry/tracing@npm:^7.38.0":
version: 7.38.0
resolution: "@sentry/tracing@npm:7.38.0"
dependencies:
"@sentry/core": 7.38.0
"@sentry/types": 7.38.0
"@sentry/utils": 7.38.0
tslib: ^1.9.3
checksum: 74231ebf1059a1b73a886fcbcb2dba9a93e9a4b7e10caab51995ec95fd645a8b4dcfb90c7085ef548cf4e92b13cd180e3b14bb678aee50393b29a260c6268de8
languageName: node
linkType: hard

"@sentry/types@npm:7.38.0":
version: 7.38.0
resolution: "@sentry/types@npm:7.38.0"
checksum: 8e2e3352ce787f96854fd791b0f1c6476067e727bde3a0660422d9c75a6c1f7e32304b13d05ac287bd93ef4c5172f011abbc7e0b2052854c883f5098ff27cfc0
languageName: node
linkType: hard

"@sentry/utils@npm:7.38.0":
version: 7.38.0
resolution: "@sentry/utils@npm:7.38.0"
dependencies:
"@sentry/types": 7.38.0
tslib: ^1.9.3
checksum: b2f2d397f3e17a4bfd29adea2a95f7a34c0f558221004ea16a17f98e4e29b73f986ea0e4d00a9621fa69f69e56cdd75df64b448159e49357fb5ab4b2756c9e37
languageName: node
linkType: hard

"@sinclair/typebox@npm:^0.24.1":
version: 0.24.44
resolution: "@sinclair/typebox@npm:0.24.44"
Expand Down Expand Up @@ -8625,13 +8558,6 @@ __metadata:
languageName: node
linkType: hard

"fflate@npm:^0.4.1":
version: 0.4.8
resolution: "fflate@npm:0.4.8"
checksum: 29d8cbe44d5e7f53e7f5a160ac7f9cc025480c7b3bfd85c5f898cbe20dfa2dad4732daa534982664bf30b35896a90af44ea33ede5d94c5ffd1b8b0c0a0a56ca2
languageName: node
linkType: hard

"figures@npm:^1.7.0":
version: 1.7.0
resolution: "figures@npm:1.7.0"
Expand Down Expand Up @@ -13939,16 +13865,6 @@ __metadata:
languageName: node
linkType: hard

"posthog-js@npm:^1.52.0":
version: 1.52.0
resolution: "posthog-js@npm:1.52.0"
dependencies:
fflate: ^0.4.1
rrweb-snapshot: ^1.1.14
checksum: 2ceb0b36a22fe3cbd8a9fb1c01a8c0636a1501bdc3687060ddeb712d491b95c87f4c4ce8860de0a189b6e39ce23ffd1e9e27bbc8b2e730179ceffdf4f444e15b
languageName: node
linkType: hard

"prepend-http@npm:^2.0.0":
version: 2.0.0
resolution: "prepend-http@npm:2.0.0"
Expand Down Expand Up @@ -14873,13 +14789,6 @@ __metadata:
languageName: node
linkType: hard

"rrweb-snapshot@npm:^1.1.14":
version: 1.1.14
resolution: "rrweb-snapshot@npm:1.1.14"
checksum: 2e9a30233b542824bbca46af5588d1d7c909efafa00b38fb79d59637af17ec0f3fbe60ed37c4195448804a22aea0f47531da25a42af6ac9dc6281c3c6e5693db
languageName: node
linkType: hard

"run-async@npm:^2.4.0":
version: 2.4.1
resolution: "run-async@npm:2.4.1"
Expand Down

0 comments on commit 14cb9d0

Please sign in to comment.