Upgrade dd-trace, add APM tracing around key commands, fix tags should be attached to root spans (#3243)

This commit is contained in:
Tom Moor
2022-03-14 20:03:12 -07:00
committed by GitHub
parent f3705b4a22
commit 15cecf1e53
13 changed files with 176 additions and 119 deletions

View File

@@ -1,6 +1,7 @@
import { Transaction } from "sequelize";
import { sequelize } from "@server/database/sequelize";
import Logger from "@server/logging/logger";
import { APM } from "@server/logging/tracing";
import {
ApiKey,
Attachment,
@@ -20,7 +21,7 @@ import {
Share,
} from "@server/models";
export default async function teamPermanentDeleter(team: Team) {
async function teamPermanentDeleter(team: Team) {
if (!team.deletedAt) {
throw new Error(
`Cannot permanently delete ${team.id} team. Please delete it and try again.`
@@ -203,3 +204,5 @@ export default async function teamPermanentDeleter(team: Team) {
throw err;
}
}
export default APM.traceFunction({})(teamPermanentDeleter);