Skip to content

Commit

Permalink
Only instrument fs with parent span
Browse files Browse the repository at this point in the history
  • Loading branch information
unflxw committed Dec 27, 2022
1 parent 92851af commit af900e2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { setParams, setSessionData } from "./helpers"
import { BaseLogger, Logger, LoggerLevel } from "./logger"

import { Instrumentation } from "@opentelemetry/instrumentation"
import { trace } from "@opentelemetry/api"
import {
ExpressInstrumentation,
ExpressLayerType
Expand Down Expand Up @@ -299,6 +300,11 @@ export class Client {
},
"@prisma/instrumentation": {
middleware: true
},
"@opentelemetry/instrumentation-fs": {
createHook: () => {
return trace.getActiveSpan() !== undefined
}
}
}
}
Expand Down

0 comments on commit af900e2

Please sign in to comment.