chore: Move tracing decorators into the codebase (#4623)
* Vendorize tracing, finally fix service name issues * Upgrade datadaog-metrics, rename decorators -> tracing * lint
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { APM } from "@server/logging/tracing";
|
||||
import { traceFunction } from "@server/logging/tracing";
|
||||
import { Document } from "@server/models";
|
||||
import DocumentHelper from "@server/models/helpers/DocumentHelper";
|
||||
import presentUser from "./user";
|
||||
@@ -63,6 +63,6 @@ async function present(
|
||||
return data;
|
||||
}
|
||||
|
||||
export default APM.traceFunction({
|
||||
export default traceFunction({
|
||||
spanName: "presentDocument",
|
||||
})(present);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { APM } from "@server/logging/tracing";
|
||||
import { traceFunction } from "@server/logging/tracing";
|
||||
import { User } from "@server/models";
|
||||
|
||||
type Policy = {
|
||||
@@ -16,6 +16,6 @@ function present(user: User, objects: Record<string, any>[]): Policy[] {
|
||||
}));
|
||||
}
|
||||
|
||||
export default APM.traceFunction({
|
||||
export default traceFunction({
|
||||
spanName: "presentPolicy",
|
||||
})(present);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { APM } from "@server/logging/tracing";
|
||||
import { traceFunction } from "@server/logging/tracing";
|
||||
import { Document, Collection, Team } from "@server/models";
|
||||
|
||||
type Action = {
|
||||
@@ -33,6 +33,6 @@ function present(
|
||||
};
|
||||
}
|
||||
|
||||
export default APM.traceFunction({
|
||||
export default traceFunction({
|
||||
spanName: "presentSlackAttachment",
|
||||
})(present);
|
||||
|
||||
Reference in New Issue
Block a user