Skip to content

Commit 2d3b117

Browse files
CopilotProLoser
andauthored
feat: add Sentry.io error monitoring to main map and 19hz map
Agent-Logs-Url: https://github.com/ProLoser/funcheapmap/sessions/5d709fde-8f61-445a-95dc-2d4bb488439c Co-authored-by: ProLoser <67395+ProLoser@users.noreply.github.com>
1 parent c728787 commit 2d3b117

4 files changed

Lines changed: 16 additions & 1 deletion

File tree

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
APIFY_TOKEN=apify_api_1234567890
22
GOOGLE_TOKEN=your_google_maps_api_key_here
33
SPOTIFY_CLIENT_ID=your_spotify_client_id_here
4-
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here
4+
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here
5+
SENTRY_DSN=https://your_key@oXXXXXX.ingest.sentry.io/XXXXXXX

.github/workflows/deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ jobs:
2020
GOOGLE_TOKEN: ${{ secrets.GOOGLE_TOKEN }}
2121
SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }}
2222
SPOTIFY_CLIENT_SECRET: ${{ secrets.SPOTIFY_CLIENT_SECRET }}
23+
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
2324
run: |
2425
sed -i "s/__APIFY_TOKEN__/${APIFY_TOKEN}/g" map.js 19hz/map.js
2526
sed -i "s/__GOOGLE_TOKEN__/${GOOGLE_TOKEN}/g" map.js 19hz/map.js
2627
sed -i "s/__GOOGLE_TOKEN__/${GOOGLE_TOKEN}/g" index.html 19hz/index.html
2728
sed -i "s/__SPOTIFY_CLIENT_ID__/${SPOTIFY_CLIENT_ID}/g" 19hz/map.js
2829
sed -i "s/__SPOTIFY_CLIENT_SECRET__/${SPOTIFY_CLIENT_SECRET}/g" 19hz/map.js
30+
sed -i "s/__SENTRY_DSN__/${SENTRY_DSN}/g" index.html 19hz/index.html
2931
- uses: JamesIves/github-pages-deploy-action@v4
3032
with:
3133
folder: .

19hz/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@
8787
<script async
8888
src="https://maps.googleapis.com/maps/api/js?v=3.exp&loading=async&key=__GOOGLE_TOKEN__&libraries=marker&callback=initialize"></script>
8989

90+
<!-- Sentry -->
91+
<script src="https://cdn.jsdelivr.net/npm/@sentry/browser@8/build/bundle.min.js" crossorigin="anonymous"></script>
92+
<script>
93+
Sentry.init({ dsn: '__SENTRY_DSN__', environment: '19hz' })
94+
</script>
95+
9096
<!-- Google tag (gtag.js) -->
9197
<script async src="https://www.googletagmanager.com/gtag/js?id=G-0NECRETGYD"></script>
9298
<script>

index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ <h2 class="event-card-title"></h2>
118118
<script src="map.js"></script>
119119
<script async src="https://maps.googleapis.com/maps/api/js?v=3.exp&loading=async&key=__GOOGLE_TOKEN__&libraries=marker&callback=initialize"></script>
120120

121+
<!-- Sentry -->
122+
<script src="https://cdn.jsdelivr.net/npm/@sentry/browser@8/build/bundle.min.js" crossorigin="anonymous"></script>
123+
<script>
124+
Sentry.init({ dsn: '__SENTRY_DSN__', environment: 'funcheapsf' })
125+
</script>
126+
121127
<!-- Google tag (gtag.js) -->
122128
<script async src="https://www.googletagmanager.com/gtag/js?id=G-0NECRETGYD"></script>
123129
<script>

0 commit comments

Comments
 (0)