Skip to content

Commit

Permalink
feat(workers): adding tails for sentry debugging (#14691)
Browse files Browse the repository at this point in the history
* adding tails for sentry debugging

* removed legacy monitoring system
  • Loading branch information
julien51 authored Sep 27, 2024
1 parent 6a84e07 commit d9c32e0
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 74 deletions.
1 change: 1 addition & 0 deletions graph-service/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name = "graph-service"
main = "src/index.ts"
compatibility_date = "2024-07-29"
tail_consumers = [{service = "graph-service-tail"}]

[vars]
SENTRY_DSN="https://5f60928f69cd6e060f6bed5bfd5b4a2c@o555569.ingest.us.sentry.io/4507855281979392"
1 change: 0 additions & 1 deletion provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
},
"dependencies": {
"ethers": "6.13.2",
"toucan-js": "3.4.0",
"wrangler": "3.67.1"
},
"scripts": {
Expand Down
19 changes: 1 addition & 18 deletions provider/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import handler from './handler'
import { Toucan } from 'toucan-js'
import { Env } from './types'

/**
Expand All @@ -12,22 +11,6 @@ export default {
context: ExecutionContext
): Promise<Response> {
context.passThroughOnException()

const sentry = new Toucan({
dsn: env.SENTRY_DSN,
release: '1.0.0',
context,
request,
})

try {
const response = await handler(request, env)
return response
} catch (error) {
sentry.captureException(error)
return new Response('Something went wrong! Team has been notified.', {
status: 500,
})
}
return await handler(request, env)
},
} as ExportedHandler<Env>
1 change: 0 additions & 1 deletion provider/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export interface Env {
SENTRY_DSN: string
ARBITRUM_PROVIDER: string
AVALANCHE_PROVIDER: string
BSC_PROVIDER: string
Expand Down
4 changes: 1 addition & 3 deletions provider/wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
name = "rpc-provider"
main = "src/index.ts"
compatibility_date = "2022-08-17"

[vars]
SENTRY_DSN = "https://aaff7faa0a6a46378c53d2414ed9d7c4@o555569.ingest.sentry.io/4504487269171200"
tail_consumers = [{service = "rpc-provider-tail"}]
51 changes: 0 additions & 51 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15828,16 +15828,6 @@ __metadata:
languageName: node
linkType: hard

"@sentry/core@npm:7.112.2":
version: 7.112.2
resolution: "@sentry/core@npm:7.112.2"
dependencies:
"@sentry/types": "npm:7.112.2"
"@sentry/utils": "npm:7.112.2"
checksum: 10/db998cb2a8d6fb95d4e55a25c3be84e09dc71373e5532ccdb1067c82b10c45269b26f2468d8285f7d17f1cf192ba48806c761e247fa3ed3afb60ae1d559178b0
languageName: node
linkType: hard

"@sentry/core@npm:7.114.0":
version: 7.114.0
resolution: "@sentry/core@npm:7.114.0"
Expand Down Expand Up @@ -15899,18 +15889,6 @@ __metadata:
languageName: node
linkType: hard

"@sentry/integrations@npm:7.112.2":
version: 7.112.2
resolution: "@sentry/integrations@npm:7.112.2"
dependencies:
"@sentry/core": "npm:7.112.2"
"@sentry/types": "npm:7.112.2"
"@sentry/utils": "npm:7.112.2"
localforage: "npm:^1.8.1"
checksum: 10/fbb4852516e801ff3d1ec3e913a4c0237cb4418dfbec82ba70a86cceaf9dfa0db54df38fee4ce461cf07cf7896a3c8be8cca6128be6a42a09601b91719711a0a
languageName: node
linkType: hard

"@sentry/integrations@npm:7.118.0":
version: 7.118.0
resolution: "@sentry/integrations@npm:7.118.0"
Expand Down Expand Up @@ -16131,13 +16109,6 @@ __metadata:
languageName: node
linkType: hard

"@sentry/types@npm:7.112.2":
version: 7.112.2
resolution: "@sentry/types@npm:7.112.2"
checksum: 10/4ac8d0727f159adaba0da39f1bc5508153f4ad0f2df716ab221973bdf962fe44c3966253b40d50219d77c28d089a8d8899ade0369178416a6cb469f9d107efbf
languageName: node
linkType: hard

"@sentry/types@npm:7.114.0":
version: 7.114.0
resolution: "@sentry/types@npm:7.114.0"
Expand Down Expand Up @@ -16183,15 +16154,6 @@ __metadata:
languageName: node
linkType: hard

"@sentry/utils@npm:7.112.2":
version: 7.112.2
resolution: "@sentry/utils@npm:7.112.2"
dependencies:
"@sentry/types": "npm:7.112.2"
checksum: 10/7d641278c78fc6e7e707b9908859708c863cd90e9ad24e1c3973ee81757254560852a43c076552615f89fbe61c668f20027ea385125b6c14fe2e164bb9e57538
languageName: node
linkType: hard

"@sentry/utils@npm:7.114.0":
version: 7.114.0
resolution: "@sentry/utils@npm:7.114.0"
Expand Down Expand Up @@ -45193,7 +45155,6 @@ __metadata:
"@types/node": "npm:20.14.13"
"@unlock-protocol/networks": "workspace:^"
ethers: "npm:6.13.2"
toucan-js: "npm:3.4.0"
typescript: "npm:5.5.4"
vitest: "npm:2.1.1"
wrangler: "npm:3.67.1"
Expand Down Expand Up @@ -51027,18 +50988,6 @@ __metadata:
languageName: node
linkType: hard

"toucan-js@npm:3.4.0":
version: 3.4.0
resolution: "toucan-js@npm:3.4.0"
dependencies:
"@sentry/core": "npm:7.112.2"
"@sentry/integrations": "npm:7.112.2"
"@sentry/types": "npm:7.112.2"
"@sentry/utils": "npm:7.112.2"
checksum: 10/e931a758c2fc70de5453198d002e368d31fa345a768d40fedad17471bf4a843fce2db5587099a66e62ffb0a99011d830122623d9652014034cff48b2fb629adf
languageName: node
linkType: hard

"toucan-js@npm:4.0.0":
version: 4.0.0
resolution: "toucan-js@npm:4.0.0"
Expand Down

0 comments on commit d9c32e0

Please sign in to comment.