Skip to content

Commit bfb1a5c

Browse files
committed
chore(sentry): remove deprecated metrics
1 parent 9dfa733 commit bfb1a5c

2 files changed

Lines changed: 0 additions & 28 deletions

File tree

packages/server/src/middleware/log.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,6 @@ export function logMiddleware(app, options) {
9999
const routeName = ctx.event.name;
100100
const isMatchedRoute = routeName.startsWith("router.");
101101

102-
if (_compasSentryExport.metrics?.increment) {
103-
const compasRouteName = isMatchedRoute ? routeName : "<unmatched>";
104-
_compasSentryExport.metrics.increment("compas.route.name", 1, {
105-
tags: {
106-
compasRouteName,
107-
},
108-
unit: "none",
109-
});
110-
}
111-
112102
if (span) {
113103
if (!isMatchedRoute) {
114104
// Discard sampled spans which don't match a route.

packages/store/src/queue-worker.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -431,15 +431,6 @@ function queueWorkerRun(
431431
const [job] = await jobTodoQuery(where, orderBy).exec(sql);
432432

433433
if (!job?.id) {
434-
if (_compasSentryExport?.metrics?.increment) {
435-
_compasSentryExport.metrics.increment("compas.queue.job", 1, {
436-
tags: {
437-
compasQueueJob: "<waiting worker>",
438-
},
439-
unit: "none",
440-
});
441-
}
442-
443434
return {
444435
didHandleJob: false,
445436
};
@@ -528,15 +519,6 @@ async function queueWorkerExecuteJob(logger, sql, options, job) {
528519
forceTransaction: true,
529520
},
530521
async () => {
531-
if (_sentry?.metrics?.increment) {
532-
_sentry.metrics.increment("compas.queue.job", 1, {
533-
tags: {
534-
compasQueueJob: job.name,
535-
},
536-
unit: "none",
537-
});
538-
}
539-
540522
return await exec();
541523
},
542524
);

0 commit comments

Comments
 (0)