mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(bot): clean up "not found in cache" errors in sentry
This commit is contained in:
parent
63777bf810
commit
d74a6678c8
3 changed files with 22 additions and 2 deletions
|
|
@ -213,6 +213,13 @@ public class Bot
|
|||
{
|
||||
_metrics.Measure.Meter.Mark(BotMetrics.BotErrors, exc.GetType().FullName);
|
||||
|
||||
if (exc is Myriad.Extensions.NotFoundInCacheException ce)
|
||||
{
|
||||
var scope = serviceScope.Resolve<Scope>();
|
||||
scope.SetTag("entity.id", ce.EntityId.ToString());
|
||||
scope.SetTag("entity.type", ce.EntityType);
|
||||
}
|
||||
|
||||
// Make this beforehand so we can access the event ID for logging
|
||||
var sentryEvent = new SentryEvent(exc);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue