Problem/Motivation
The core metrics include nodes and comments, but don't include users, although a site can have no nodes, but cannot have no users.
Steps to reproduce
Enable all Prometheus modules.
Proposed resolution
Include a UserCount plugin in the base exporter.
Remaining tasks
Do it.
User interface changes
Extra choice on admin/config/system/prometheus_exporter
API changes
None
Data model changes
config/install contains an extra entry.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 316432_user-6.patch | 6.32 KB | fgm |
| #4 | 316432_user-4.patch | 8.22 KB | fgm |
Comments
Comment #2
fgmSuggested implementation.
Comment #3
kim.pepperLooking good, although we need tests. There are examples in
\Drupal\Tests\prometheus_exporter\Unit\Plugin\MetricsCollectorComment #4
fgmDone. I don't like the multiple willReturn() mechanism much, because it appears to be undocumented: it would seem more logical to have a single mock userQuery returning different values based on the condition calls, but I don't see how to do it, so...
Comment #5
kim.pepperThis needs a re-roll against the 8.x-1.x branch.
Comment #6
fgmHere it is. Quite shorter indeed.
Comment #8
kim.pepperCommitted and pushed to 8.x-1.x. Thanks!