mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
fix: added a check to avoid double counting (#6925)
Due to how we handle redirects of embedded proxy, we ended up counting the same request twice. This PR adds a boolean to res.locals which we then check if set to avoid double counting.
This commit is contained in:
parent
574eb284b9
commit
af54e272d2
@ -70,7 +70,9 @@ export function responseTimeMetrics(
|
|||||||
time,
|
time,
|
||||||
appName,
|
appName,
|
||||||
};
|
};
|
||||||
|
if (!res.locals.responseTimeEmitted) {
|
||||||
eventBus.emit(REQUEST_TIME, timingInfo);
|
res.locals.responseTimeEmitted = true;
|
||||||
|
eventBus.emit(REQUEST_TIME, timingInfo);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user