Skip to content

Commit

Permalink
chore(sentry): remove deprecated metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkdev98 committed Dec 9, 2024
1 parent 9dfa733 commit bfb1a5c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
10 changes: 0 additions & 10 deletions packages/server/src/middleware/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,6 @@ export function logMiddleware(app, options) {
const routeName = ctx.event.name;
const isMatchedRoute = routeName.startsWith("router.");

if (_compasSentryExport.metrics?.increment) {
const compasRouteName = isMatchedRoute ? routeName : "<unmatched>";
_compasSentryExport.metrics.increment("compas.route.name", 1, {
tags: {
compasRouteName,
},
unit: "none",
});
}

if (span) {
if (!isMatchedRoute) {
// Discard sampled spans which don't match a route.
Expand Down
18 changes: 0 additions & 18 deletions packages/store/src/queue-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,6 @@ function queueWorkerRun(
const [job] = await jobTodoQuery(where, orderBy).exec(sql);

if (!job?.id) {
if (_compasSentryExport?.metrics?.increment) {
_compasSentryExport.metrics.increment("compas.queue.job", 1, {
tags: {
compasQueueJob: "<waiting worker>",
},
unit: "none",
});
}

return {
didHandleJob: false,
};
Expand Down Expand Up @@ -528,15 +519,6 @@ async function queueWorkerExecuteJob(logger, sql, options, job) {
forceTransaction: true,
},
async () => {
if (_sentry?.metrics?.increment) {
_sentry.metrics.increment("compas.queue.job", 1, {
tags: {
compasQueueJob: job.name,
},
unit: "none",
});
}

return await exec();
},
);
Expand Down

0 comments on commit bfb1a5c

Please sign in to comment.