-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sentry to achievements worker (#3640)
* feat: add sentry to achievements worker * feat: add RELEASE var
- Loading branch information
bigint
committed
Aug 29, 2023
1 parent
5f6f941
commit 4c5044d
Showing
10 changed files
with
137 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
SENTRY_DSN="" | ||
CLICKHOUSE_REST_ENDPOINT="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type { Toucan } from 'toucan-js'; | ||
|
||
import type { Env, WorkerRequest } from '../types'; | ||
|
||
const buildRequest = ( | ||
request: Request, | ||
env: Env, | ||
ctx: ExecutionContext, | ||
sentry?: Toucan | ||
): WorkerRequest => { | ||
const temp: WorkerRequest = request as WorkerRequest; | ||
temp.req = request; | ||
temp.env = env; | ||
temp.ctx = ctx; | ||
temp.sentry = sentry; | ||
|
||
return temp; | ||
}; | ||
|
||
export default buildRequest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
import type { IRequestStrict } from 'itty-router'; | ||
import type { Toucan } from 'toucan-js'; | ||
|
||
export interface Env { | ||
SENTRY_DSN: string; | ||
RELEASE: string; | ||
CLICKHOUSE_REST_ENDPOINT: string; | ||
} | ||
|
||
export type WorkerRequest = { | ||
req: Request; | ||
env: Env; | ||
ctx: ExecutionContext; | ||
sentry?: Toucan; | ||
} & IRequestStrict; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,6 @@ routes = [ | |
mode = "smart" | ||
|
||
[env.production.vars] | ||
SENTRY_DSN = "" | ||
RELEASE = "" | ||
CLICKHOUSE_REST_ENDPOINT = "" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4c5044d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
prerender – ./apps/prerender
prerender-lenster.vercel.app
prerender-git-main-lenster.vercel.app
prerender.lenster.xyz
4c5044d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
web – ./apps/web
lenster.vercel.app
web-lenster.vercel.app
web-git-main-lenster.vercel.app
lenster.xyz