Skip to content

Commit 11f551a

Browse files
dej611benakansara
authored andcommitted
[Core] Exclude js or map assets from event loop utilisation log (elastic#203155)
## Summary Exclude `js` and `.js.map` assets from the logger.
1 parent b5085c9 commit 11f551a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/http/core-http-server-internal/src/http_server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ function startEluMeasurement<T>(
9393
if (
9494
eluMonitorOptions.logging.enabled &&
9595
active >= eluMonitorOptions.logging.threshold.ela &&
96-
utilization >= eluMonitorOptions.logging.threshold.elu
96+
utilization >= eluMonitorOptions.logging.threshold.elu &&
97+
// static js and js.map assets are generating lots of noise for this
98+
// event loop check, hiding endpoint slowness which are higher priority
99+
// remove this check once endpoints slowness is addressed
100+
!['js', 'js.map'].some((ext) => path.endsWith(ext))
97101
) {
98102
log.warn(
99103
`Event loop utilization for ${path} exceeded threshold of ${elaThreshold}ms (${Math.round(

0 commit comments

Comments
 (0)