Skip to content

Add option to disable automatic crash reporting - #373

Merged
matux merged 2 commits into
rollbar:masterfrom
jsahoo:master
Jul 9, 2026
Merged

Add option to disable automatic crash reporting#373
matux merged 2 commits into
rollbar:masterfrom
jsahoo:master

Conversation

@jsahoo

@jsahoo jsahoo commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description of the change

I use Rollbar for error logging but another tool for crash reporting. In older versions of the SDK, it was possible to initialize Rollbar without a crash collector. After updating, I found that there was no longer a way to do that. This PR adds a configuration flag that allows automatic crash reporting to be disabled by preventing RollbarCrashCollector from being initialized:

let config = RollbarMutableConfig()
config.isCrashReportingEnabled = false
Rollbar.initWithConfiguration(config)

Automatic crash reporting is enabled by default, so you only need to set this property when you explicitly want to disable crash reporting.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Maintenance
  • New release

Related issues

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers assigned
  • Issue from task tracker has a link to this pull request
  • Changes have been reviewed by at least one other engineer

@matux matux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, thank you for taking upon yourself to address this, @jsahoo!

Did you consider making this a flag on RollbarConfig instead of a parallel state+method overload?

@jsahoo

jsahoo commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

This is good, thank you for taking upon yourself to address this, @jsahoo!

Did you consider making this a flag on RollbarConfig instead of a parallel state+method overload?

Updated!

@matux matux left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much!

@matux
matux enabled auto-merge (squash) July 9, 2026 07:14
@matux
matux merged commit 91127b9 into rollbar:master Jul 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Q: Can't disable crash reporting?

2 participants