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

[java] Include JMX monitoring feature in the Grid local distributor #10674

Merged
merged 3 commits into from May 23, 2022

Conversation

bonigarcia
Copy link
Member

@bonigarcia bonigarcia commented May 20, 2022

Description

This PR implements issue #9794. It exposes metrics through JMX in the local distributor, namely:

  • Number of up nodes
  • Number of down nodes
  • Number of active slots
  • Number of idle slots

Regarding the session elapsed time (requested in the original feature proposal issue), that info should be available using GraphQL.

Motivation and Context

Grid 4 already implements JMX monitoring on the nodes. This PR allows to gather also other metrics in the local distributor.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@CLAassistant
Copy link

CLAassistant commented May 23, 2022

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

Codecov Report

Merging #10674 (b0d30d8) into trunk (dab928e) will increase coverage by 0.01%.
The diff coverage is 66.66%.

❗ Current head b0d30d8 differs from pull request most recent head 5476c3f. Consider uploading reports for the commit 5476c3f to get more accurate results

@@            Coverage Diff             @@
##            trunk   #10674      +/-   ##
==========================================
+ Coverage   45.58%   45.60%   +0.01%     
==========================================
  Files          86       86              
  Lines        5739     5741       +2     
  Branches      274      274              
==========================================
+ Hits         2616     2618       +2     
  Misses       2849     2849              
  Partials      274      274              
Impacted Files Coverage Δ
py/selenium/webdriver/common/action_chains.py 25.47% <66.66%> (+1.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dab928e...5476c3f. Read the comment docs.

This patch exposes the number of nodes in the local distributor using JMX
through a managed atribute called NodeCount.

Issue SeleniumHQ#9794
@sonarcloud
Copy link

sonarcloud bot commented May 23, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Thank you, @bonigarcia!

@diemol diemol merged commit a3f3f9f into SeleniumHQ:trunk May 23, 2022
@bonigarcia bonigarcia deleted the hub-monitoring branch May 23, 2022 11:40
elgatov pushed a commit to elgatov/selenium that referenced this pull request Jun 27, 2022
…eleniumHQ#10674)

* [java] Set LocalDistributor as ManagedService

This patch exposes the number of nodes in the local distributor using JMX
through a managed atribute called NodeCount.

Issue SeleniumHQ#9794

* [java] Include metric for counting the number of down nodes in local distributor

* [java] Include metric for counting the number of active and idle slots in local distributor

Issue SeleniumHQ#9794

[skip ci]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants