Skip to content

Commit

Permalink
feat: allow disabling attaching a breadcrumb
Browse files Browse the repository at this point in the history
  • Loading branch information
DiederikvandenB committed Feb 25, 2020
1 parent 5868bc1 commit 2ba8188
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/SentryLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ export class SentryLink extends ApolloLink {
* @param {OperationsBreadcrumb} breadcrumb
*/
attachBreadcrumbToSentry = (breadcrumb: OperationsBreadcrumb): void => {
if (this.options.breadcrumb?.enable === false) return;

if (breadcrumb.flushed) {
console.warn('[apollo-link-sentry] SentryLink.attachBreadcrumbToSentry() was called on an already flushed breadcrumb');
return;
Expand Down

0 comments on commit 2ba8188

Please sign in to comment.