mammoth.convertToHtml tracing
This commit is contained in:
@@ -2,7 +2,7 @@ import escapeRegExp from "lodash/escapeRegExp";
|
||||
import { simpleParser } from "mailparser";
|
||||
import mammoth from "mammoth";
|
||||
import { FileImportError } from "@server/errors";
|
||||
import { trace } from "@server/logging/tracing";
|
||||
import { trace, traceFunction } from "@server/logging/tracing";
|
||||
import turndownService from "@server/utils/turndown";
|
||||
|
||||
@trace()
|
||||
@@ -56,7 +56,9 @@ export class DocumentConverter {
|
||||
|
||||
public static async docXToMarkdown(content: Buffer | string) {
|
||||
if (content instanceof Buffer) {
|
||||
const { value } = await mammoth.convertToHtml({
|
||||
const { value } = await traceFunction({ spanName: "convertToHtml" })(
|
||||
mammoth.convertToHtml
|
||||
)({
|
||||
buffer: content,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user