Skip to content

Commit f156d7c

Browse files
committed
Try to set Sentry release on runtime
1 parent 6830f73 commit f156d7c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/sentry-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Sentry Release
22

33
on:
44
push:
5-
branches: [main]
5+
branches: ["main"]
66

77
jobs:
88
sentry_release:

functions/_middleware.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import Toucan from "toucan-js";
22

33
const errorHandler = async (event) => {
4-
const {next, request, env} = event;
4+
const {next, env} = event;
55
const sentry = new Toucan({
66
dsn: env.SENTRY_DSN,
77
// Includes 'waitUntil', which is essential for Sentry logs to be delivered. Also includes 'request' -- no need to set it separately.
88
context: event,
99
allowedHeaders: /(.*)/,
1010
env: "production",
11+
release: env.CF_PAGES_COMMIT_SHA,
1112
});
1213
event.data.sentry = sentry;
1314
try {

0 commit comments

Comments
 (0)