Response to PR feedback:
- Switched to using regex for event matching.
- Use enum for controlling frequency for better readability.
- Remove debug statement.
- Remove unnecessary '?'.
Signed-off-by: Tim deBoer <git@tdeboer.ca>
Move filtering of telemetry events to a json file so that it is easy to
configure the filtering of events without changing code.
Prior to this, 'list' events were hardcoded to be filtered to once per day per
instance of Podman Desktop. Now, this setting is done via a JSON config file,
and there are three options that we could use for other events:
- disabled (true/false) - totally disable an event
- ratio (0.0-1.0) - only send x% of this event
- frequency - only supports 'dailyPerInstance' to start (for list events),
but could support things like 'daily' or 'weekly' in the future.
Part of #4970.
Signed-off-by: Tim deBoer <git@tdeboer.ca>