Software /
code /
prosody-modules
Annotate
mod_measure_active_users/README.md @ 5173:460f78654864
mod_muc_rtbl: also filter messages
This was a bit tricky because we don't want to run the JIDs
through SHA256 on each message. Took a while to come up with this
simple plan of just caching the SHA256 of the JIDs on the
occupants.
This will leave some dirt in the occupants after unloading the
module, but that should be ok; once they cycle the room, the
hashes will be gone.
This is direly needed, otherwise, there is a tight race between
the moderation activities and the actors joining the room.
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Tue, 21 Feb 2023 21:37:27 +0100 |
parent | 4774:1132f2888cd2 |
rev | line source |
---|---|
4774
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
1 --- |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 labels: |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 - 'Stage-Alpha' |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 summary: 'Measure number of daily, weekly and monthly active users' |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 ... |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 Introduction |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 ============ |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 This module calculates the number of daily, weekly and monthly active users - |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 often abbreviated as DAU, WAU and MAU. |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 These metrics are more accurate for determining how many people are actually |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 using a service. For example simply counting registered accounts will typically |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 include many dormant accounts that aren't really being used. Many servers also |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 track the number of connected users. This is a useful metric for many purposes, |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 but it is generally lower than the actual number of users - because some users |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 may only connect at certain times of day. |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 The module defines "activity" as any login/logout event during the time period, |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 and for this it depends on mod_lastlog2 being loaded (it reads the data stored |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 by mod_lastlog2). Each individual user is only counted once. |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 "Daily" means any event within the past 24 hours, "weekly" means within the |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 past 7 days, and "monthly" means within the past 30 days. |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 Details |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 ======= |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 The user count is calculated shortly after startup, and then recalculated |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 hourly after that. |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 Metrics are exported using Prosody's built-in statistics API. |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 There is no configuration for this module. |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
36 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
37 Compatibility |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 ============= |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
39 |
1132f2888cd2
mod_measure_active_users: Calculate active user counts over fixed time periods
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
40 Requires Prosody 0.11 or later with mod_lastlog2 enabled. |