Skip to content

Commit 4ea63b8

Browse files
wa0x6eTodmy
andauthored
chore: upgrade metrics package (#245)
Co-authored-by: Dmytro Tolok <[email protected]>
1 parent 1258fa6 commit 4ea63b8

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"@ethersproject/address": "^5.7.0",
3232
"@ethersproject/wallet": "^5.7.0",
3333
"@sendgrid/mail": "^7.7.0",
34-
"@snapshot-labs/snapshot-metrics": "^1.0.0",
35-
"@snapshot-labs/snapshot-sentry": "^1.3.0",
34+
"@snapshot-labs/snapshot-metrics": "^1.1.0",
35+
"@snapshot-labs/snapshot-sentry": "^1.4.0",
3636
"bluebird": "^3.7.2",
3737
"bull": "^4.10.4",
3838
"compression": "^1.7.4",

src/helpers/metrics.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import type { Express } from 'express';
12
import init, { client } from '@snapshot-labs/snapshot-metrics';
3+
import { capture } from '@snapshot-labs/snapshot-sentry';
24
import db from './mysql';
35
import { SUBSCRIPTION_TYPE } from '../templates';
46
import { mailerQueue } from '../queues';
5-
import type { Express } from 'express';
67

78
export default function initMetrics(app: Express) {
89
init(app, {
@@ -15,7 +16,8 @@ export default function initMetrics(app: Express) {
1516
/^\/images\/.*\.png$/,
1617
/^\/(preview|send)\/.*$/,
1718
/^\/(webhook|subscriber|subscriptionsList)$/
18-
]
19+
],
20+
errorHandler: capture
1921
});
2022
}
2123

yarn.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,18 +1284,18 @@
12841284
resolved "https://registry.yarnpkg.com/@snapshot-labs/prettier-config/-/prettier-config-0.1.0-beta.7.tgz#c8e07e7e9baabee245020a72ac05835b65139823"
12851285
integrity sha512-k/FUf4VWhwLFUmKuWs2mNvmPe691hqhvCJuujD4TfbIivWysmL1TqthwfdQUrQEAQUqVQ2ZKEiGkbufp5J27eQ==
12861286

1287-
"@snapshot-labs/snapshot-metrics@^1.0.0":
1288-
version "1.0.0"
1289-
resolved "https://registry.yarnpkg.com/@snapshot-labs/snapshot-metrics/-/snapshot-metrics-1.0.0.tgz#1f88a6aacc81f639f7059c153b53c550934cd3b3"
1290-
integrity sha512-6T8a2NX6Qo6zVAoNIWV8eSJCukCynI/HCLp37VZTzX8jwU/ahGsiDTQC3I/MDus+LDB+8pI5nju33NwM8Q7n2g==
1287+
"@snapshot-labs/snapshot-metrics@^1.1.0":
1288+
version "1.1.0"
1289+
resolved "https://registry.yarnpkg.com/@snapshot-labs/snapshot-metrics/-/snapshot-metrics-1.1.0.tgz#0b700ed50a28400cae7bfa47de9f5a1cc018719a"
1290+
integrity sha512-KajdSDd7cjQ9pRRYLDMqSd6yTcQ7Ln2/1zrRY5w23vGTSAH/NF0/7XojPYiW+IIdVAa5fV5nrcjFXT1X62XSYA==
12911291
dependencies:
12921292
express-prom-bundle "^6.6.0"
12931293
prom-client "^14.2.0"
12941294

1295-
"@snapshot-labs/snapshot-sentry@^1.3.0":
1296-
version "1.3.0"
1297-
resolved "https://registry.yarnpkg.com/@snapshot-labs/snapshot-sentry/-/snapshot-sentry-1.3.0.tgz#9822d62b9a8918c70a09167da7b36ff43b9edba0"
1298-
integrity sha512-Qy+uLwsLhlRjx8MSbVU46tYVbiA5fIp6i1bgyab5pHwqsBaP93sjQIBetfGzeWxmmUXI8cS4lUOCc/x0HXEEGg==
1295+
"@snapshot-labs/snapshot-sentry@^1.4.0":
1296+
version "1.4.0"
1297+
resolved "https://registry.yarnpkg.com/@snapshot-labs/snapshot-sentry/-/snapshot-sentry-1.4.0.tgz#77933c2d8a32bb1b8daa05fec78ea73f8b78258d"
1298+
integrity sha512-261ZJGQ1rsSnAqsPrED1Hn2CoRFLtGla2WfnhqddcfYfYgEx2hsxUGs0jpSBCSfY/AsfK1+MgsoIXOFWXu74qQ==
12991299
dependencies:
13001300
"@sentry/node" "^7.60.1"
13011301

0 commit comments

Comments
 (0)