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

expose pending tasks of eventloops as metrics #1398

Closed
warmuuh opened this issue Nov 27, 2020 · 0 comments · Fixed by #1928
Closed

expose pending tasks of eventloops as metrics #1398

warmuuh opened this issue Nov 27, 2020 · 0 comments · Fixed by #1928
Assignees
Labels
type/enhancement A general enhancement
Milestone

Comments

@warmuuh
Copy link

warmuuh commented Nov 27, 2020

expose pending tasks of eventloops as metrics both for server and client.
Currently, some metrics are provided (reactor.netty.http.[client|server]). it would be nice to also see pending tasks as this is an important metric about the health of the system.

see https://gitter.im/reactor/reactor-netty?at=5fc0ec2466dcfa77e2a78389 for related question

Motivation

a current solution seems to be possible like this

 httpServer.doOnBind(config -> {
        config.loopResources()
            .onServer(httpServer.configuration().isPreferNative())
            .forEach(eventExecutor -> {
              if (eventExecutor instanceof SingleThreadEventExecutor) {
                var singleThreadEventExecutor = (SingleThreadEventExecutor) eventExecutor;
                Gauge.builder(SERVER_PENDING_TASK_METRIC, singleThreadEventExecutor::pendingTasks)
                    .description("Pending Tasks")
                    .tag(SERVER_THREAD_NAME, singleThreadEventExecutor.threadProperties().name())
                    .tag(SERVER_THREAD_STATE, singleThreadEventExecutor.threadProperties().state().name())
                    .register(registry);
              }
            });

Desired solution

httpServer::metric and TcpClient::metric should result in this metric to also be exposed

@warmuuh warmuuh added status/need-triage A new issue that still need to be evaluated as a whole type/enhancement A general enhancement labels Nov 27, 2020
@violetagg violetagg removed the status/need-triage A new issue that still need to be evaluated as a whole label Nov 27, 2020
@violetagg violetagg added this to the 1.0.x Backlog milestone Nov 27, 2020
pderop added a commit to pderop/reactor-netty that referenced this issue Dec 10, 2021
pderop added a commit to pderop/reactor-netty that referenced this issue Dec 13, 2021
@violetagg violetagg modified the milestones: 1.0.x Backlog, 1.0.14 Dec 13, 2021
pderop added a commit to pderop/reactor-netty that referenced this issue Dec 13, 2021
pderop added a commit to pderop/reactor-netty that referenced this issue Dec 13, 2021
…ems to generate a side effect where default loop resource is disposed and recreated (reactor#1398)
pderop added a commit that referenced this issue Dec 14, 2021
Added reactor.netty.eventloop.pending.tasks metric and updated documentation accordingly.

Fixes #1398
pderop added a commit to pderop/reactor-netty that referenced this issue Dec 14, 2021
Added reactor.netty.eventloop.pending.tasks metric and updated documentation accordingly.

Fixes reactor#1398
pderop added a commit to pderop/reactor-netty that referenced this issue Dec 15, 2021
author Pierre De Rop <pderop@vmware.com> 1638532581 +0100
committer Pierre De Rop <pierre.derop@gmail.com> 1639561835 +0100

parent f9f965a
author Pierre De Rop <pderop@vmware.com> 1638532581 +0100
committer Pierre De Rop <pierre.derop@gmail.com> 1639561545 +0100

parent f9f965a
author Pierre De Rop <pderop@vmware.com> 1638532581 +0100
committer Pierre De Rop <pierre.derop@gmail.com> 1639561349 +0100

[documentation] Use NMT to track native memory leaks

[documentation] unfortunately, NMT does not help because buffer pool reserves memory in advance. However, one can monitor the current number of allocated direct buffers using some metrics returned by buffer pool

Added two new gauges in order to allow to monitor the number of active (either acquired or released) head/direct buffers.

fixed typo.

removed unused imports

removed unused imports, again ...

Inherit CONTRIBUTING.md from the parent project

Bump com.diffplug.spotless from 6.0.2 to 6.0.4 (reactor#1924)

Bumps com.diffplug.spotless from 6.0.2 to 6.0.4.

---
updated-dependencies:
- dependency-name: com.diffplug.spotless
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Add API for configuring the bind address for NameResolverProvider (reactor#1919)

Fixes reactor#1920

Co-authored-by: Violeta Georgieva <milesg78@gmail.com>
Co-authored-by: Violeta Georgieva <violetag@vmware.com>

Bump build-info-extractor-gradle from 4.25.1 to 4.25.2 (reactor#1925)

Bumps [build-info-extractor-gradle](https://github.com/jfrog/build-info) from 4.25.1 to 4.25.2.
- [Release notes](https://github.com/jfrog/build-info/releases)
- [Changelog](https://github.com/jfrog/build-info/blob/master/RELEASE.md)
- [Commits](jfrog/build-info@build-info-gradle-extractor-4.25.1...build-info-gradle-extractor-4.25.2)

---
updated-dependencies:
- dependency-name: org.jfrog.buildinfo:build-info-extractor-gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Expose metrics for the number of the active HTTP/2 streams (reactor#1927)

Fixes reactor#1328

Upgrade to Gradle v7.3.1

According to the documentation the command below should be used for upgrade
`./gradlew wrapper --gradle-version 7.3.1`

Update to Netty v4.1.72.Final

[test] Call EmbeddedChannel#finishAndReleaseAll to clean up the memory (reactor#1931)

Expose pending tasks of eventloops as metrics (reactor#1928)

Added reactor.netty.eventloop.pending.tasks metric and updated documentation accordingly.

Fixes reactor#1398

Added two new gauges in order to allow to monitor the number of active (either acquired or released) head/direct buffers.

Fixed typo, improved test. (reactor#1917)
pderop added a commit to pderop/reactor-netty that referenced this issue Dec 23, 2021
author Pierre De Rop <pderop@vmware.com> 1638532581 +0100
committer Pierre De Rop <pierre.derop@gmail.com> 1640275999 +0100

parent 406e6cc
author Pierre De Rop <pderop@vmware.com> 1638532581 +0100
committer Pierre De Rop <pierre.derop@gmail.com> 1640275873 +0100

parent f9f965a
author Pierre De Rop <pderop@vmware.com> 1638532581 +0100
committer Pierre De Rop <pierre.derop@gmail.com> 1639561835 +0100

parent f9f965a
author Pierre De Rop <pderop@vmware.com> 1638532581 +0100
committer Pierre De Rop <pierre.derop@gmail.com> 1639561545 +0100

parent f9f965a
author Pierre De Rop <pderop@vmware.com> 1638532581 +0100
committer Pierre De Rop <pierre.derop@gmail.com> 1639561349 +0100

[documentation] Use NMT to track native memory leaks

[documentation] unfortunately, NMT does not help because buffer pool reserves memory in advance. However, one can monitor the current number of allocated direct buffers using some metrics returned by buffer pool

Added two new gauges in order to allow to monitor the number of active (either acquired or released) head/direct buffers.

fixed typo.

removed unused imports

removed unused imports, again ...

Inherit CONTRIBUTING.md from the parent project

Bump com.diffplug.spotless from 6.0.2 to 6.0.4 (reactor#1924)

Bumps com.diffplug.spotless from 6.0.2 to 6.0.4.

---
updated-dependencies:
- dependency-name: com.diffplug.spotless
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Add API for configuring the bind address for NameResolverProvider (reactor#1919)

Fixes reactor#1920

Co-authored-by: Violeta Georgieva <milesg78@gmail.com>
Co-authored-by: Violeta Georgieva <violetag@vmware.com>

Bump build-info-extractor-gradle from 4.25.1 to 4.25.2 (reactor#1925)

Bumps [build-info-extractor-gradle](https://github.com/jfrog/build-info) from 4.25.1 to 4.25.2.
- [Release notes](https://github.com/jfrog/build-info/releases)
- [Changelog](https://github.com/jfrog/build-info/blob/master/RELEASE.md)
- [Commits](jfrog/build-info@build-info-gradle-extractor-4.25.1...build-info-gradle-extractor-4.25.2)

---
updated-dependencies:
- dependency-name: org.jfrog.buildinfo:build-info-extractor-gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Expose metrics for the number of the active HTTP/2 streams (reactor#1927)

Fixes reactor#1328

Upgrade to Gradle v7.3.1

According to the documentation the command below should be used for upgrade
`./gradlew wrapper --gradle-version 7.3.1`

Update to Netty v4.1.72.Final

[test] Call EmbeddedChannel#finishAndReleaseAll to clean up the memory (reactor#1931)

Expose pending tasks of eventloops as metrics (reactor#1928)

Added reactor.netty.eventloop.pending.tasks metric and updated documentation accordingly.

Fixes reactor#1398

Added two new gauges in order to allow to monitor the number of active (either acquired or released) head/direct buffers.

Fixed typo, improved test. (reactor#1917)

[test] Fix the random failures observed on GHA

Update Netty QUIC Codec to v0.0.25.Final

Bump com.diffplug.spotless from 6.0.4 to 6.0.5 (reactor#1939)

Bumps com.diffplug.spotless from 6.0.4 to 6.0.5.

---
updated-dependencies:
- dependency-name: com.diffplug.spotless
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump mockito-core from 4.1.0 to 4.2.0 (reactor#1938)

Bumps [mockito-core](https://github.com/mockito/mockito) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-core
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump build-info-extractor-gradle from 4.25.2 to 4.25.3 (reactor#1947)

Bumps [build-info-extractor-gradle](https://github.com/jfrog/build-info) from 4.25.2 to 4.25.3.
- [Release notes](https://github.com/jfrog/build-info/releases)
- [Changelog](https://github.com/jfrog/build-info/blob/master/RELEASE.md)
- [Commits](jfrog/build-info@build-info-gradle-extractor-4.25.2...build-info-gradle-extractor-4.25.3)

---
updated-dependencies:
- dependency-name: org.jfrog.buildinfo:build-info-extractor-gradle
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump logback-classic from 1.2.8 to 1.2.9 (reactor#1945)

Bumps logback-classic from 1.2.8 to 1.2.9.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-classic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Bump jackson-databind from 2.13.0 to 2.13.1 (reactor#1946)

Bumps [jackson-databind](https://github.com/FasterXML/jackson) from 2.13.0 to 2.13.1.
- [Release notes](https://github.com/FasterXML/jackson/releases)
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

When ConnectionProvider#acquire, add a pre-screen for connection pool existing before locking inside computeIfAbsent (reactor#1930)

Co-authored-by: RoundSoupBubble <11007575+RoundSoupBubble@users.noreply.github.com>

Ensure HttpConnectionProvider exposes correct maxConnections/maxConnectionsPerHost information (reactor#1948)

Fixes reactor#1941

[build] Switch from adopt to temurin as used java distribution (reactor#1949)

According to
https://github.com/actions/setup-java#supported-distributions

"
NOTE: Adopt OpenJDK got moved to Eclipse Temurin and won't be updated anymore.
It is highly recommended to migrate workflows from adopt to temurin to keep receiving
software and security updates. See more details in the Good-bye AdoptOpenJDK post.
"

Add a pre-screen before locking inside computeIfAbsent (reactor#1950)

Related to comment
reactor#1930 (comment)

Upgrade to Gradle v7.3.3

According to the documentation the command below should be used for upgrade
`./gradlew wrapper --gradle-version 7.3.3`

Bump braveVersion from 5.13.5 to 5.13.6 (reactor#1955)

Bumps `braveVersion` from 5.13.5 to 5.13.6.

Updates `brave-instrumentation-http` from 5.13.5 to 5.13.6

Updates `brave-instrumentation-http-tests` from 5.13.5 to 5.13.6

---
updated-dependencies:
- dependency-name: io.zipkin.brave:brave-instrumentation-http
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.zipkin.brave:brave-instrumentation-http-tests
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Apply feedback (reactor#1917)
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 a pull request may close this issue.

3 participants