Skip to content

Commit

Permalink
add breadcrumb filter
Browse files Browse the repository at this point in the history
  • Loading branch information
TheXorog committed May 16, 2024
1 parent eb162e2 commit ef1f044
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions DisCatSharp/Clients/BaseDiscordClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ protected BaseDiscordClient(DiscordConfiguration config)
EnableScopeSync = true,
Debug = this.Configuration.SentryDebug
};

options.SetBeforeBreadcrumb(b
=> new Breadcrumb(Utilities.StripTokens(b.Message),
b.Type,
b.Data?.Select(x => new KeyValuePair<string, string>(x.Key, Utilities.StripTokens(x.Value)))
.ToDictionary(x => x.Key, x => x.Value),
b.Category,
b.Level));

options.SetBeforeSend((e, _) =>
{
if (!this.Configuration.DisableExceptionFilter)
Expand Down

0 comments on commit ef1f044

Please sign in to comment.