nestjs-sentry
nestjs-sentry copied to clipboard
Store non-error messages as breadcrumbs on SentryService logger methods
@msimon and @empz This update was added to v2.0.8
I'm a bit confused. It seems that this behaviour is already presente in master... where captureMessage are commented out.
But what I find strange is that this is a BC. Maybe it would need a major version not a patch.
This has been corrected.. This will get rolled into 3.0.0 as the option to send as breadcrumb or message.
Thanks.. see version 2.0.9
From: Luca Saba @.> Date: Thursday, July 15, 2021 at 11:53 AM To: ntegral/nestjs-sentry @.> Cc: Dexter Hardy @.>, Comment @.> Subject: Re: [ntegral/nestjs-sentry] Store non-error messages as breadcrumbs on SentryService logger methods (#42)
I'm a bit confused. It seems that this behaviour is already presente in master... where captureMessage are commented outhttps://github.com/ntegral/nestjs-sentry/blob/master/lib/sentry.service.ts#L64.
But what I find strange is that this is a BC. Maybe it would need a major version not a patch.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ntegral/nestjs-sentry/pull/42#issuecomment-880810353, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADEYTTNLNUD3KP5R4UP6JWLTX375XANCNFSM46LSWW4A.
This has been corrected.. This will get rolled into 3.0.0 as the option to send as breadcrumb or message. Thanks.. see version 2.0.9 From: Luca Saba @.> Date: Thursday, July 15, 2021 at 11:53 AM To: ntegral/nestjs-sentry @.> Cc: Dexter Hardy @.>, Comment @.> Subject: Re: [ntegral/nestjs-sentry] Store non-error messages as breadcrumbs on SentryService logger methods (#42) I'm a bit confused. It seems that this behaviour is already presente in master... where captureMessage are commented outhttps://github.com/ntegral/nestjs-sentry/blob/master/lib/sentry.service.ts#L64. But what I find strange is that this is a BC. Maybe it would need a major version not a patch. — You are receiving this because you commented. Reply to this email directly, view it on GitHub<#42 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADEYTTNLNUD3KP5R4UP6JWLTX375XANCNFSM46LSWW4A.
@ntegral May I ask why did you rollback this change?
I don't understand why would anybody want to capture and send everything to Sentry. It doesn't make sense at all. Every single .log() call gets converted into a Sentry event and gets published.

How's that even useful? non-error messages should be stored as breadcrumbs in the current scope. https://docs.sentry.io/platforms/node/enriching-events/breadcrumbs/
This will be included as an optional flag... That way it will not disrupt the current users of the package
@ntegral Anything I can do to help get this merged? It would be a huge upgrade to me — at the moment my Sentry instance is filled with unhelpful and irrelevant issues from verbose and log events.
Based off the above message by @ntegral ...
This has been corrected.. This will get rolled into 3.0.0 as the option to send as breadcrumb or message.
Apparently it was to be rolled into 3.0.0? Was that the case? If so then we can opt in for breadcrumbs and therefore obviously the PR is redundant (attn: @benbarbersmith).
If not... would love to see this merged ASAP because it massively reduces noise and improves the effectiveness of using Sentry as a tool to diagnose and identify issues in a NestJS app.
:/ seems to not be part of 3.0.6 @ntegral
Simple fix to not clutter your sentry. Add this to the sentry init or factory configuration.
beforeSend: (event) => {
if ([Severity.Log, Severity.Info].includes(event.level)) {
return null;
} else {
return event;
}
},