datalust / seq-app-htmlemail

Plug-in apps that act on event streams in the Seq log server
Apache License 2.0
51 stars 38 forks source link

Suppression dictionary entries are never cleaned up #75

Closed nblumhardt closed 3 years ago

nblumhardt commented 3 years ago

The per-event-type suppression feature uses a concurrent dictionary _lastSeen:

https://github.com/datalust/seq-app-htmlemail/blob/dev/src/Seq.App.EmailPlus/EmailApp.cs#L21

The dictionary is still updated even when no suppression time is set, and the entries here aren't evicted after the suppression time elapses, resulting in leaks if e.g. every event reaching the app has a unique event type.