fix(medusa): Replace default http tracer (#9390)
This commit is contained in:
committed by
GitHub
parent
570c1803f2
commit
9b6d0e9d56
@@ -180,7 +180,7 @@ function getBodyParserMiddleware(args?: ParserConfigArgs) {
|
||||
|
||||
// TODO this router would need a proper rework, but it is out of scope right now
|
||||
|
||||
class ApiRoutesLoader {
|
||||
export class ApiRoutesLoader {
|
||||
/**
|
||||
* Map of router path and its descriptor
|
||||
* @private
|
||||
@@ -910,27 +910,6 @@ export class RoutesLoader {
|
||||
*/
|
||||
readonly #sourceDir: string | string[]
|
||||
|
||||
static instrument: {
|
||||
/**
|
||||
* Instrument middleware function calls by wrapping the original
|
||||
* middleware handler inside a custom implementation
|
||||
*/
|
||||
middleware: (callback: (typeof ApiRoutesLoader)["traceMiddleware"]) => void
|
||||
|
||||
/**
|
||||
* Instrument route handler function calls by wrapping the original
|
||||
* middleware handler inside a custom implementation
|
||||
*/
|
||||
route: (callback: (typeof ApiRoutesLoader)["traceRoute"]) => void
|
||||
} = {
|
||||
middleware(callback) {
|
||||
ApiRoutesLoader.traceMiddleware = callback
|
||||
},
|
||||
route(callback) {
|
||||
ApiRoutesLoader.traceRoute = callback
|
||||
},
|
||||
}
|
||||
|
||||
constructor({
|
||||
app,
|
||||
activityId,
|
||||
|
||||
Reference in New Issue
Block a user