Suggestion: Regex-based inbound data filters
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #598 by @TimeToBuildBob — closed without merging
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by reviewing the heartbeat endpoint and the existing watcher-level filtering described in the issue. Clarify whether the intended scope is discard-only filtering or also regex replacement and field-specific matching, then define how user configuration and completion criteria should be agreed before implementation.
Written by the indexing model from the issue text.
Description
Being able to filter the inbound data has been the most popular feature request for a very long time and comes up again and again in the issues of different repositories. In the status quo, some watchers (e.g. the window watcher) have their own filtering, but they have various problems:
- Discoverability: The configuration is so hidden that even the developers forget that it exist (no offense). Even when it's exposed as a config, it still requires the user to find it somewhere in the docs, then edit the configuration file to set it up correctly. This is not very discoverable.
- Consistency: The user needs to look into the docs for each watcher to see whether it supports data filtering and to find out how it's configured.
- Limited expressiveness: For the window watcher, it's only possible to remove all window titles. Many people say they only want to exclude some sensitive information (e.g. mail subjects). In my case, I'm frequently using an app that shows a timer in the window title, creating a new entry every second, which makes the timeline barely readable and very unresponsive.
Suggestion
We could add regex-based filtering on the heartbeat level: whenever a heartbeat comes in, it's checked against a set of user-configurable regexes. If one matches on any field of the entry, the entry is discarded. We could also extend this feature to allow regex-replacing entries or matching only some fields of the JSON entry.
Similar inbound data filters can be found in e.g. Sentry.
I could probably implement this by myself, at least in Python and the Vue frontend, but probably in Rust as well, but I'd like to know if the approach is welcome in the first place. Tbh, if it isn't, I'd consider writing a simple proxy server that does exactly this -- applying some replacements to the heartbeat endpoint and passing everything else through.
- Dominant language
- Rust
- Stars
- 322
- Forks
- 105
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ActivityWatch/aw-server-rust
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ActivityWatch/aw-server-rust#798 · 1 comment ·
Maintainers usually reply within 1 day
-
Allow configuring sync dir in the `aw-sync/config.toml` filePossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 58/100
ActivityWatch/aw-server-rust#853 · 1 comment ·
Maintainers usually reply within 1 day
-
Correctness bugs: heartbeat cache, query cache invalidation, commit rollback statePossibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 25/100
ActivityWatch/aw-server-rust#825 · 2 comments ·
Maintainers usually reply within 1 day
-
aw-sync: rowid upgrade bootstrap does not recover backfills lost under the old timestamp cursorOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
ActivityWatch/aw-server-rust#793 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
ActivityWatch/aw-server-rust#790 ·
Maintainers usually reply within 1 day
All issues in ActivityWatch/aw-server-rust
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
symposium-dev/symposium#530 ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
topgrade-rs/topgrade#2540 ·
Maintainers usually reply within 1 day
-
Invalid JSON options for ngram and edge_ngram silently use defaultsPossibly taken @Tilendlesa claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
noemaforge/vimanam#153 ·
Maintainers usually reply within 1 day