armeria
armeria copied to clipboard
Add ServerMetrics to collect metrics related server
Motivation:
Add ServerMetrics
to collect metrics related server. #4992
Modifications:
- Add
ServerMetrics.increasePendingHttp1Requests()
inHttp1RequestDecoder#channelRead
beforefireChannelRead()
- Add
ServerMetrics.increasePendingHttp2Requests()
inHttp2RequestDecoder#onHeadersRead
beforefireChannelRead()
- Add
ServerMetrics.decreasePendingHttp1Requests()
,ServerMetrics.decreasePendingHttp2Requests()
,ServerMetrics.increaseActiveHttp1WebSocketRequests()
,ServerMetrics.increaseActiveHttp1Requests()
andServerMetrics.increaseActiveHttp2Requests()
inHttpServerHandler#serve0
beforeservice.serve(reqCtx, req)
- Add
ServerMetrics.decreaseActiveHttp1WebSocketRequests()
,ServerMetrics.decreaseActiveHttp1Requests()
andServerMetrics.decreaseActiveHttp2Requests()
inAbstractHttpResponseHandler#tryComplete
- Add
ServerMetrics.increaseActiveConnectionsAndGet()
andServerMetrics.decreaseActiveConnections()
inConnectionLimitingHandler#channelRead
Result:
- Closes #4992. (If this resolves the issue.)
- users can implement features based on ServerMertrics like graceful shutdowns such as stopping the server when there are no pending requests.
๐ Build Scanยฎ (commit: 9371f15c6ceb647890230bbc6f337710e713c68d)
Job name | Status | Build Scanยฎ |
---|---|---|
build-windows-latest-jdk-21 | โ | https://ge.armeria.dev/s/f6dangr2eafsq |
build-self-hosted-unsafe-jdk-8 | โ | https://ge.armeria.dev/s/jgktuyts66nym |
build-self-hosted-unsafe-jdk-21-snapshot-blockhound | โ | https://ge.armeria.dev/s/trchnvzvvczmq |
build-self-hosted-unsafe-jdk-17-min-java-17-coverage | โ | https://ge.armeria.dev/s/nnvlgviplsawm |
build-self-hosted-unsafe-jdk-17-min-java-11 | โ | https://ge.armeria.dev/s/y6fsk52tlpdm4 |
build-self-hosted-unsafe-jdk-17-leak | โ | https://ge.armeria.dev/s/tg552oevoqtns |
build-self-hosted-unsafe-jdk-11 | โ | https://ge.armeria.dev/s/ppsia33yhdrvi |
build-macos-12-jdk-21 | โ | https://ge.armeria.dev/s/3ir4tnr5aqgho |
Let me resolve the conflict. ๐
Gentle ping ๐
I've pushed commits because we are about to release the next version. There are also some failing tests that will be resolved after https://github.com/line/armeria/pull/5680 gets merged.
Thanks a lot, @seongbeenkim! ๐