Skip to content

Commit

Permalink
chore: sentry -> utils.telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
tokebe committed Nov 9, 2023
1 parent b63605d commit c9a2e4e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"dependencies": {
"@biothings-explorer/query_graph_handler": "workspace:../query_graph_handler",
"@biothings-explorer/smartapi-kg": "workspace:../smartapi-kg",
"@biothings-explorer/utils": "workspace:../utils",
"@bull-board/api": "^5.9.1",
"@bull-board/express": "^5.9.1",
"@sentry/node": "^7.74.1",
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/async/asyncquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const axios = require("axios");
const { customAlphabet } = require("nanoid");
const utils = require("../../utils/common");
const { redisClient } = require("@biothings-explorer/query_graph_handler");
const { LogEntry } = require("@biothings-explorer/query_graph_handler");
const { LogEntry } = require("@biothings-explorer/utils");
const lz4 = require("lz4");
const { Readable } = require("stream");
const chunker = require("stream-chunker");
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/threading/threadHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ServerOverloadedError = require("../../utils/errors/server_overloaded_erro
const { customAlphabet } = require("nanoid");
const { getQueryQueue } = require("../async/asyncquery_queue");

const Sentry = require("@sentry/node");
const { Telemetry } = require("@biothings-explorer/utils");
const ErrorHandler = require("../../middlewares/error.js");

const SYNC_MIN_CONCURRENCY = 2;
Expand Down Expand Up @@ -308,7 +308,7 @@ function taskResponse(response, status = undefined) {
function taskError(error) {
if (global.parentPort) {
if (ErrorHandler.shouldHandleError(error)) {
Sentry.captureException(error);
Telemetry.captureException(error);
}
global.parentPort.postMessage({ threadId, err: error });
return undefined;
Expand Down
20 changes: 11 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./built"
"outDir": "./built",
"paths": {
"smartapi-kg": ["../smartapi-kg"],
"@biothings-explorer/query_graph_handler": ["../query_graph_handler"],
"@biothings-explorer/utils": ["../utils"]
}
},
"include": [
"./src/**/*",
"./src/**/*.json"
],
"exclude": [
"**/node_modules/**",
"**/__test__/**"
],
"include": ["./src/**/*", "./src/**/*.json"],
"exclude": ["**/node_modules/**", "**/__test__/**"],
"references": [
{
"path": "../smartapi-kg"
},
{
"path": "../query_graph_handler"
},
{
"path": "../utils"
}
]
}

0 comments on commit c9a2e4e

Please sign in to comment.