Skip to content

Commit 954889c

Browse files
Merge pull request #37 from InstaNode-dev/obs/dashboard-browser-fresh
obs: New Relic browser agent + VITE_COMMIT_ID + ErrorBoundary (track 8/8)
2 parents 3cd4103 + 9ce2cf9 commit 954889c

7 files changed

Lines changed: 446 additions & 45 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,19 @@ jobs:
2424
node-version: '20'
2525
cache: 'npm'
2626
- run: npm ci
27+
# Compute the short SHA of HEAD here so vite.config.ts can splice it
28+
# into the bundle (define: VITE_COMMIT_ID). Mirrors what the Go services
29+
# do via -ldflags so every frontend error reported to New Relic carries
30+
# the same build identifier the api/worker/provisioner logs use.
31+
- name: Export GIT_SHA
32+
run: echo "GIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV"
2733
- run: npm run build
2834
env:
2935
VITE_API_URL: https://api.instanode.dev
36+
# New Relic browser-agent keys. Missing or empty → main.tsx skips
37+
# init (fail-open), so PR forks / unconfigured envs still build cleanly.
38+
VITE_NEWRELIC_LICENSE_KEY: ${{ secrets.VITE_NEWRELIC_LICENSE_KEY }}
39+
VITE_NEWRELIC_APP_ID: ${{ secrets.VITE_NEWRELIC_APP_ID }}
3040
- run: cp dist/index.html dist/404.html
3141
- uses: actions/upload-pages-artifact@v3
3242
with:

0 commit comments

Comments
 (0)