Skip to content

Commit c3290e2

Browse files
committed
Add telemetry docs, complete postgres settings
1 parent cb836e9 commit c3290e2

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

docs/install_setup/configuration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,13 @@ Key | Description
5656
`EMAIL_USE_TLS` | Boolean, whether to use TLS for sending e-mails. Defaults to `True`. When using STARTTLS, set this to `False` and use a port different from 25.
5757
`DEFAULT_FROM_EMAIL` | "From" address for automated e-mails
5858
`THUMBNAIL_CACHE_CONFIG` | Dictionary with settings for the thumbnail cache. See [Flask-Caching](https://flask-caching.readthedocs.io/en/latest/) for possible settings.
59+
`REQUEST_CACHE_CONFIG` | Dictionary with settings for the request cache. See [Flask-Caching](https://flask-caching.readthedocs.io/en/latest/) for possible settings.
60+
`PERSISTENT_CACHE_CONFIG` | Dictionary with settings for the persistent cache, used e.g. for telemetry. See [Flask-Caching](https://flask-caching.readthedocs.io/en/latest/) for possible settings.
5961
`CELERY_CONFIG` | Settings for the Celery background task queue. See [Celery](https://docs.celeryq.dev/en/stable/userguide/configuration.html) for possible settings.
6062
`REPORT_DIR` | Temporary directory where the output of running Gramps reports will be stored
6163
`EXPORT_DIR` | Temporary directory where the output of exporting the Gramps database will be stored
6264
`REGISTRATION_DISABLED` | If `True`, disallow new user registration (default `False`)
65+
`DISABLE_TELEMETRY` | If `True`, disable statistics telemetry (default `False`). See [telemetry](telemetry.md) for details.
6366

6467

6568
!!! info
@@ -85,6 +88,8 @@ Key | Description
8588
----|-------------
8689
`MEDIA_PREFIX_TREE` | Boolean, whether or not to use a separate subfolder for the media files of each tree. Defaults to `False`, but strongly recommend to use `True` in a multi-tree setup
8790
`NEW_DB_BACKEND` | The database backend to use for newly created family trees. Must be one of `sqlite`, `postgresql`, or `sharedpostgresql`. Defaults to `sqlite`.
91+
`POSTGRES_HOST` | The host name of the PostgreSQL server used for creating new trees when using a multi-tree setup with the SharedPostgreSQL backend
92+
`POSTGRES_PORT` | The port of the PostgreSQL server used for creating new trees when using a multi-tree setup with the SharedPostgreSQL backend
8893

8994

9095
### Settings only for AI features

docs/install_setup/telemetry.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Telemetry
2+
3+
Starting from Gramps Web API version 3.2.0, Gramps Web by default sends fully anonymized telemetry data every 24 hours to an analytics endpoint controlled by the Gramps Web team. This page contains information about the telemetry data collected, how it is used, and how to disable it if desired.
4+
5+
## What data is collected?
6+
7+
The telemetry data is a small JSON payload of the following form:
8+
9+
```json
10+
{
11+
"server_uuid": "c04325bfa7ae4578bcf134ec8fc046a7",
12+
"tree_uuid": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
13+
"timestamp": 1701234567,
14+
}
15+
```
16+
17+
As you can check yourself [in the source code](https://github.com/gramps-project/gramps-web-api/blob/master/gramps_webapi/api/telemetry.py#L83-L87), the server and tree identifiers are unique for the server and tree, but they do not contain any personally identifiable information. The `timestamp` is the current time as a Unix timestamp
18+
19+
## Why is the data collected?
20+
21+
Sending a unique identifier once a day allows the Gramps Web team to track how many unique servers are running Gramps Web, and how many unique trees are being used.
22+
23+
This is important to understand the impact on external services that are used by Gramps Web, such as map tiles.
24+
25+
## How is the data collected?
26+
27+
When a request is made to your Gramps Web API server, it checks whether telemetry has been sent in the last 24 hours (by checking a key in the local cache). If not, the above payload is sent to an endpoint that logs the data.
28+
29+
The logging endpoint is hosted on Google Cloud Run and is directly deployed from an [open source repository](https://github.com/DavidMStraub/cloud-run-telemetry), so you can inspect how the data is processed.
30+
31+
## What will be done with the data?
32+
33+
First and foremost, no data beyond the anonymized payload, that could hypothetically be collected (such as the server's IP address), will be used by the Gramps Web team.
34+
35+
The collected anonymized IDs and timestamp will be aggregated to produce graphs such as:
36+
37+
- Number of active Gramps Web installations as function of time
38+
- Number of active Gramps Web trees as function of time
39+
40+
These graphs will be published on the Gramps Web documentation site.
41+
42+
## How to disable telemetry?
43+
44+
Since the statistics data is useful for the Gramps Web team and we have ensured that no personally identifiable data is sent, **we would be grateful if you don't disable telemetry!**
45+
46+
Nevertheless, Gramps Web puts users in full control, so of course you can choose to disable the feature if you want.
47+
48+
To do so, simply set the `DISABLE_TELEMETRY` configuration option to `True` (e.g. by setting the `GRAMPSWEB_DISABLE_TELEMETRY` environment varaible to `true` – see the [configuration docs](configuration.md) for details).

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ nav:
1919
- Using PostgreSQL: install_setup/postgres.md
2020
- Hosting media on S3: install_setup/s3.md
2121
- Limit CPU & memory usage: install_setup/cpu-limited.md
22+
- Telemetry: install_setup/telemetry.md
2223
- Gramps 5.2 upgrade guide: install_setup/v2.md
2324
- Gramps 6.0 upgrade guide: install_setup/v3.md
2425
- Administration:

0 commit comments

Comments
 (0)