Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture HTTP/2 server active stream metrics #2357

Merged
merged 1 commit into from
Jul 7, 2022

Conversation

samueldlightfoot
Copy link
Contributor

Capture H2 active streams metrics for HttpServer.

Issue: #2356

@samueldlightfoot samueldlightfoot force-pushed the active-streams-final branch 3 times, most recently from a9d1f64 to 59d0d23 Compare July 5, 2022 22:03
@violetagg
Copy link
Member

@samueldlightfoot We need to exclude these two new default methods from the compatibility check. Please add to build.gradle

diff --git a/reactor-netty-http/build.gradle b/reactor-netty-http/build.gradle
index 670c2dd5f..3c9f45049 100644
--- a/reactor-netty-http/build.gradle
+++ b/reactor-netty-http/build.gradle
@@ -197,6 +197,10 @@ task japicmp(type: JapicmpTask) {
 	ignoreMissingClasses = true
 	includeSynthetic = true
 	onlyIf { "$compatibleVersion" != "SKIP" }
+	methodExcludes = [
+			"reactor.netty.http.server.HttpServerMetricsRecorder#recordStreamClosed(java.net.SocketAddress)",
+			"reactor.netty.http.server.HttpServerMetricsRecorder#recordStreamOpened(java.net.SocketAddress)"
+	]
 }
 
 tasks.japicmp.dependsOn(downloadBaseline)

@violetagg violetagg linked an issue Jul 6, 2022 that may be closed by this pull request
@violetagg violetagg added the type/enhancement A general enhancement label Jul 6, 2022
@violetagg violetagg added this to the 1.0.21 milestone Jul 6, 2022
@samueldlightfoot
Copy link
Contributor Author

Build failure on (windows-2019, nio). Not sure if this is a transient error or a real issue. @violetagg

@violetagg
Copy link
Member

Build failure on (windows-2019, nio). Not sure if this is a transient error or a real issue. @violetagg

This is a flaky test and not relevant to this change.
Give me some time I'll come back to this PR in 1h.

@violetagg violetagg requested a review from a team July 6, 2022 11:29
@violetagg
Copy link
Member

@reactor/netty-team PTAL
This PR is targeting main branch, I will take care to back port it to 1.0.x branch.

Comment on lines 55 to 57
public String getName() {
return "reactor.netty.http.server.active.streams";
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the existing http server metrics, we currently have for example:

  • reactor.netty.http.server.connections.active
  • reactor.netty.http.server.connections.total
    etc ...

We use the same prefix, followed by the meaning of the meter (active, total, etc ...)

so, for consistency reasons, wouldn't it be better to use :

reactor.netty.http.server.steams.active instead of reactor.netty.http.server.active.streams ?

thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree - I'd aligned with the client-side counterpart 'reactor.netty.connection.provider.active.streams', but think it makes sense to be consistent within the server metrics.

@samueldlightfoot samueldlightfoot force-pushed the active-streams-final branch 2 times, most recently from 42467eb to 0ed0372 Compare July 6, 2022 16:06
@violetagg
Copy link
Member

@pderop PTAL

Copy link
Contributor

@pderop pderop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
thanks @samueldlightfoot !

@violetagg violetagg merged commit 3a14fc6 into reactor:main Jul 7, 2022
violetagg added a commit that referenced this pull request Jul 7, 2022
violetagg added a commit that referenced this pull request Jul 7, 2022
This is already in 1.1.0-M4 with PR #2357
violetagg added a commit that referenced this pull request Jul 7, 2022
pderop added a commit to pderop/reactor-netty that referenced this pull request Jul 7, 2022
@violetagg
Copy link
Member

@samueldlightfoot Thanks for the PR

I back ported the feature in 1.0.x branch with 23a9f4e

@samueldlightfoot samueldlightfoot deleted the active-streams-final branch July 7, 2022 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add HTTP/2 HttpServer metric for active streams
3 participants