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

@@ -8,6 +8,7 @@ import TurndownService from "turndown";
import utf8 from "utf8";
import { MAX_TITLE_LENGTH } from "@shared/constants";
import parseTitle from "@shared/utils/parseTitle";
import { APM } from "@server/logging/tracing";
import { User } from "@server/models";
import dataURItoBuffer from "@server/utils/dataURItoBuffer";
import { deserializeFilename } from "@server/utils/fs";
@@ -141,7 +142,7 @@ async function confluenceToMarkdown(file): Promise<string> {
return html.replace(/<br>/g, " \\n ");
}
export default async function documentImporter({
async function documentImporter({
file,
user,
ip,
@@ -212,3 +213,5 @@ export default async function documentImporter({
title,
};
}
export default APM.traceFunction({})(documentImporter);