Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev add sentry playground #3151

Merged
merged 8 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/playground/docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ bash ../scripts/build-env.sh
- BRIDGE_TFT_ADDRESS
- STATS_URL
- STELLAR_NETWORK
- SENTRY_DSN
- ENABLE_TELEMETRY

- The backend payments are done with stellar so you need to decide which network of stellar you want to connect to

Expand Down
1 change: 1 addition & 0 deletions packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"dependencies": {
"@mdi/font": "^7.2.96",
"@sentry/vue": "^8.19.0",
"@threefold/graphql_client": "2.5.0",
"@threefold/grid_client": "2.5.0",
"@threefold/gridproxy_client": "2.5.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/playground/playground-charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ image:
value: ""
- name: "STELLAR_NETWORK"
value: ""
- name: "SENTRY_DSN"
value: ""
- name: "ENABLE_TELEMETRY"
value: false


imagePullSecrets: []
Expand Down
2 changes: 2 additions & 0 deletions packages/playground/public/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ window.env = {
TIMEOUT: +"10000",
PAGE_SIZE: +"20",
MANUAL_URL: "https://www.manual.grid.tf",
SENTRY_DSN: "https://b9af6796f176d1f02837a06f0da3caee@dev.sentry.grid.tf/2",
ENABLE_TELEMETRY: "false",
};
10 changes: 8 additions & 2 deletions packages/playground/scripts/build-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ TIMEOUT="${TIMEOUT:=10000}"
PAGE_SIZE="${PAGE_SIZE:=20}"
MINTING_URL="https://alpha.minting.tfchain.grid.tf"
MANUAL_URL="${MANUAL_URL:-https://www.manual.grid.tf}"

ENABLE_TELEMETRY=false
STELLAR_ENV_Vars=(
STELLAR_HORIZON_URL
TFT_ASSET_ISSUER
Expand All @@ -23,6 +23,7 @@ case $MODE in
BRIDGE_TFT_ADDRESS="${BRIDGE_TFT_ADDRESS:-GDHJP6TF3UXYXTNEZ2P36J5FH7W4BJJQ4AYYAXC66I2Q2AH5B6O6BCFG}"
STATS_URL="${STATS_URL:-https://stats.dev.grid.tf}"
STELLAR_NETWORK="${STELLAR_NETWORK:-test}"
SENTRY_DSN="https://b9af6796f176d1f02837a06f0da3caee@dev.sentry.grid.tf/2"
;;
"qa")
GRAPHQL_URL="${GRAPHQL_URL:-https://graphql.qa.grid.tf/graphql}"
Expand All @@ -33,6 +34,7 @@ case $MODE in
BRIDGE_TFT_ADDRESS="${BRIDGE_TFT_ADDRESS:-GAQH7XXFBRWXT2SBK6AHPOLXDCLXVFAKFSOJIRMRNCDINWKHGI6UYVKM}"
STATS_URL="${STATS_URL:-https://stats.qa.grid.tf}"
STELLAR_NETWORK="${STELLAR_NETWORK:-test}"
SENTRY_DSN="https://b9af6796f176d1f02837a06f0da3caee@dev.sentry.grid.tf/2"
;;
"test")
GRAPHQL_URL="${GRAPHQL_URL:-https://graphql.test.grid.tf/graphql}"
Expand All @@ -43,6 +45,7 @@ case $MODE in
BRIDGE_TFT_ADDRESS="${BRIDGE_TFT_ADDRESS:-GA2CWNBUHX7NZ3B5GR4I23FMU7VY5RPA77IUJTIXTTTGKYSKDSV6LUA4}"
STATS_URL="${STATS_URL:-https://stats.test.grid.tf}"
STELLAR_NETWORK="${STELLAR_NETWORK:-main}"
SENTRY_DSN="https://b9af6796f176d1f02837a06f0da3caee@dev.sentry.grid.tf/2"
;;
"main")
GRAPHQL_URL="${GRAPHQL_URL:-https://graphql.grid.tf/graphql}"
Expand All @@ -53,6 +56,7 @@ case $MODE in
BRIDGE_TFT_ADDRESS="${BRIDGE_TFT_ADDRESS:-GBNOTAYUMXVO5QDYWYO2SOCOYIJ3XFIP65GKOQN7H65ZZSO6BK4SLWSC}"
STATS_URL="${STATS_URL:-https://stats.grid.tf}"
STELLAR_NETWORK="${STELLAR_NETWORK:-main}"
SENTRY_DSN="https://598bcc658bd99042ab429166035f8278@sentry.grid.tf/2"
;;
*)
echo "Unknown 'MODE' selected! Acceptable modes are [dev | qa | test | main ]"
Expand Down Expand Up @@ -93,7 +97,9 @@ window.env = {
STATS_URL: '$STATS_URL',
TIMEOUT: +'$TIMEOUT',
PAGE_SIZE: +'$PAGE_SIZE',
MANUAL_URL: '$MANUAL_URL'
MANUAL_URL: '$MANUAL_URL',
SENTRY_DSN: '$SENTRY_DSN',
ENABLE_TELEMETRY: '$ENABLE_TELEMETRY'
};
"

Expand Down
2 changes: 2 additions & 0 deletions packages/playground/src/global-components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ declare global {
TIMEOUT: number;
PAGE_SIZE: number;
MANUAL_URL: string;
SENTRY_DSN: string;
ENABLE_TELEMETRY: boolean;
};
}
}
17 changes: 17 additions & 0 deletions packages/playground/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "mosha-vue-toastify/dist/style.css";
import "./global.scss";

import * as Sentry from "@sentry/vue";
import { createPinia } from "pinia";
import { createApp } from "vue";

Expand All @@ -22,6 +23,22 @@ app.config.errorHandler = error => {
);
};

if (window.env.ENABLE_TELEMETRY) {
Sentry.init({
app,
dsn: window.env.SENTRY_DSN,
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
release: process.env.VERSION,
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
// Session Replay
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
});
}

app.use(createPinia());
app.use(router);
app.use(vuetify);
Expand Down
81 changes: 81 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2940,6 +2940,87 @@
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f"
integrity sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==

"@sentry-internal/browser-utils@8.19.0":
version "8.19.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.19.0.tgz#7a25111c5c3430c07b881d5fc83d1598af6d5676"
integrity sha512-kM/2KlikKuBR63nFi2q7MGS3V9K9hakjvUknhr/jHZqDVfEuBKmp1ZlHFAdJtglKHHJy07gPj/XqDH7BbYh5yg==
dependencies:
"@sentry/core" "8.19.0"
"@sentry/types" "8.19.0"
"@sentry/utils" "8.19.0"

"@sentry-internal/feedback@8.19.0":
version "8.19.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.19.0.tgz#7efef695fd4a058b36ef5c98145c4a990bbe877c"
integrity sha512-Jc77H8fEaGcBhERc2U/o7Q8CZHvlZLT9vAlzq0ZZR20v/1vwYcJW1ysKfTuvmw22hCR6ukhFNl6pqJocXFVhvA==
dependencies:
"@sentry/core" "8.19.0"
"@sentry/types" "8.19.0"
"@sentry/utils" "8.19.0"

"@sentry-internal/replay-canvas@8.19.0":
version "8.19.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.19.0.tgz#4afe06acadf14a709e36efe5ad7da350e3ce0815"
integrity sha512-l4pKJDHrXEctxrK7Xme/+fKToXpGwr/G2t77BzeE1WEw9LwSwADz/hi8HoMdZzuKWriM2BNbz20tpVS84sODxA==
dependencies:
"@sentry-internal/replay" "8.19.0"
"@sentry/core" "8.19.0"
"@sentry/types" "8.19.0"
"@sentry/utils" "8.19.0"

"@sentry-internal/replay@8.19.0":
version "8.19.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.19.0.tgz#7b290b19d6ba5c0ab742c4c48839cce329129b3f"
integrity sha512-EW9e1J6XbqXUXQST1AfSIzT9O8OwPyeFOkhkn9/gqOQv08TJvQEIBtWJEoJS+XFMEUuB8IqIzVWNVko/DnGt9A==
dependencies:
"@sentry-internal/browser-utils" "8.19.0"
"@sentry/core" "8.19.0"
"@sentry/types" "8.19.0"
"@sentry/utils" "8.19.0"

"@sentry/browser@8.19.0":
version "8.19.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.19.0.tgz#64551150cda979728297035f9a367ed344c7d586"
integrity sha512-ZC1HxIFm4TIGONyy9MkPG6Dw8IAhzq43t5mq9PqrB1ehuWj8GX6Vk3E26kuc2sydAm4AXbj0562OmvZHsAJpUA==
dependencies:
"@sentry-internal/browser-utils" "8.19.0"
"@sentry-internal/feedback" "8.19.0"
"@sentry-internal/replay" "8.19.0"
"@sentry-internal/replay-canvas" "8.19.0"
"@sentry/core" "8.19.0"
"@sentry/types" "8.19.0"
"@sentry/utils" "8.19.0"

"@sentry/core@8.19.0":
version "8.19.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.19.0.tgz#427d09ca27557ddc7c1bfa5e810b7f802836e0b4"
integrity sha512-MrgjsZCEjOJgQjIznnDSrLEy7qL+4LVpNieAvr49cV1rzBNSwGmWRnt/puVaPsLyCUgupVx/43BPUHB/HtKNUw==
dependencies:
"@sentry/types" "8.19.0"
"@sentry/utils" "8.19.0"

"@sentry/types@8.19.0":
version "8.19.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.19.0.tgz#26a5d56c823c5eabbb7d6f53112da335b6d96dcb"
integrity sha512-52C8X5V7mK2KIxMJt8MV5TxXAFHqrQR1RKm1oPTwKVWm8hKr1ZYJXINymNrWvpAc3oVIKLC/sa9WFYgXQh+YlA==

"@sentry/utils@8.19.0":
version "8.19.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.19.0.tgz#f22df2a38327b1cff1e04ba7f11fdf1a32d3ba22"
integrity sha512-8dWJJKaUN6Hf92Oxw2TBmHchGua2W3ZmonrZTTwLvl06jcAigbiQD0MGuF5ytZP8PHx860orV+SbTGKFzfU3Pg==
dependencies:
"@sentry/types" "8.19.0"

"@sentry/vue@^8.19.0":
version "8.19.0"
resolved "https://registry.yarnpkg.com/@sentry/vue/-/vue-8.19.0.tgz#084a39dfa462cc645c5b1931956b268698b7f32e"
integrity sha512-mFb47VINpbG2SJZUkvpq3ouxciRpkMgjMRTrFmYSRryNtovBWBmffnu0bq+2dV4sBGFiu7x2I/NbFAjpHrrhsA==
dependencies:
"@sentry/browser" "8.19.0"
"@sentry/core" "8.19.0"
"@sentry/types" "8.19.0"
"@sentry/utils" "8.19.0"

"@sideway/address@^4.1.3":
version "4.1.4"
resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.4.tgz#03dccebc6ea47fdc226f7d3d1ad512955d4783f0"
Expand Down
Loading