Skip to content

App crashes with Sentry console logging integration in SDK 9.37.0 #16920

Description

@AbhiPrasad

@coby.eastwood said:

Hey team, came across a problem when setting up logs for javascript, on our latest SDK version 9.37.0. My app will crash when enabling Sentry.consoleLoggingIntegration({levels: [‘log’]}), logging with Sentry.logger.warn('test'), and then using console log in beforeSendLog. Seems it is getting called recursively and crashes in chrome but in firefox it will show:

{
  "level": "info",
  "message": "beforeSendLog {\"level\":\"info\",\"message\":\"beforeSendLog {\\\"level\\\":\\\"info\\\",\\\"message\\\":\\\"beforeSendLog {\\\\\\\"level\\\\\\\":\\\\\\\"info\\\\\\\",\\\\\\\"message\\\\\\\":\\\\\\\"beforeSendLog {\\\\\\\\\\\\\\\"level\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"info\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"message\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"beforeSendLog \ … continues… \"sentry.sdk.version\":\"9.37.0\"}}",
  "severityNumber": 10,
  "attributes": {
    "sentry.origin": "auto.console.logging",
    "sentry.sdk.name": "sentry.javascript.react",
    "sentry.sdk.version": "9.37.0"
  }
}

Made a repro here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions