[OPENAM-11728] Unique User Login Count metric not working Created: 12/Sep/17  Updated: 15/Sep/17  Resolved: 15/Sep/17

Status: Resolved
Project: OpenAM
Component/s: authentication, monitoring
Affects Version/s: 14.5.0
Fix Version/s: 14.5.0

Type: Bug Priority: Major
Reporter: Craig McDonnell Assignee: Craig McDonnell
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Needs backport:
Needs QA verification:
Functional tests:
Are the reproduction steps defined?:
Yes and I used the same an in the description


Bug description

The following DropWizard metric is not counting the number of unique users logging in:

  • authentication.unique-uuid.success

How to reproduce the issue

  1. Select Configure > Global Services > Monitoring
  2. Ensure "Monitoring Status" and "Monitoring RMI interface status" are both checked
  3. Connect to OpenAM via JMX (e.g. using jconsole)
  4. Expand the org.forgerock.openam folder and select the authentication.unique-uuid.success metric
  5. Login to OpenAM using a number of different user accounts
  6. Refresh the authentication.unique-uuid.success metric
Expected behaviour
The authentication.unique-uuid.success metric should estimate the number of different users who have logged in - With at most +/- 1% error.
Current behaviour
The authentication.unique-uuid.success metric always reports 2 unique user logins.

Work around


Code analysis

It's not clear why this should be the case. The unit tests for org.forgerock.openam.monitoring.DistinctCounter suggest we should be able to get within 1% margin or error while only using 80KB of memory. Stepping through the calls to com.sun.identity.authentication.service.AMLoginContext#authenticationSuccessUniqueUuidMetric in the debugger makes it look like everything is wired up correctly. Further debugging necessary.

Generated at Sat Nov 28 22:31:44 UTC 2020 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.