Bugsnag v6.0.0 Release Notes

Release Date: 2020-06-22 // almost 4 years ago
  • This version contains many breaking changes. It is part of an effort to unify our notifier
    ๐Ÿ‘ libraries across platforms, making the user interface more consistent, and implementations better
    on multi-layered environments where multiple Bugsnag libraries need to work together
    (such as React Native).

    โฌ†๏ธ Please see the upgrade guide for details of all the changes and instructions on
    โฌ†๏ธ how to upgrade.

    โœจ Enhancements

    ๐Ÿ‘ Allow starting Bugsnag from PList
    #676

    The comparison of redacted keys is now case-insensitive
    #653

    Unified the three main XCode projects
    #633

    0๏ธโƒฃ Alter default session background timeout to 30s
    #581

    ๐Ÿ‘Œ Support loading configuration from values in Info.plist.
    #582

    โž• Add unhandledRejections to BugsnagErrorTypes
    #567

    ๐Ÿ“‡ Rename Bugsnag start methods
    #566

    ๐Ÿ“‡ Rename OnSend to OnSendError
    #562

    โž• Add onCrashHandler data to BugsnagEvent metadata
    #564

    ๐Ÿ“‡ Rename BugsnagUser properties
    #560

    ๐Ÿ‘‰ Make BugsnagOnErrorBlock return BOOL rather than void
    #555

    ๐Ÿ”Œ Make BugsnagPlugin take BugsnagClient as param
    #558

    ๐Ÿ‘‰ Make user editable on BugsnagEvent
    #557

    โž• Add getter for Bugsnag.context
    #554

    ๐Ÿ‘‰ Make BugsnagUser properties readonly
    #556

    โž• Add sendThreads property to BugsnagConfiguration
    #549

    Hide additional methods from public API
    #552

    ๐Ÿ”ง Move codeBundleId from configuration to non-public client property
    #548

    โž• Add structured app/device fields to BugsnagSession
    #546

    โž• Add redactedKeys for removing sensitive values from metadata
    #540

    ๐Ÿ”ง Move endpoint configuration to class
    #542

    ๐Ÿ‘‰ Make all callbacks return boolean values
    #534

    โž• Add originalError property to BugsnagEvent
    #541

    โœ‚ Remove attachCustomStacktrace from public API
    #547

    Create structured BugsnagError class
    #533

    Create structured BugsnagThread class
    #532

    Convert event.device from NSDictionary to a structured class
    #526

    Create structured BugsnagStackframe class
    #528

    Convert event.app from NSDictionary to a structured class
    #520
    #600

    ๐Ÿ‘‰ Make BugsnagClient a public interface
    #517

    โœ‚ Remove unused APIs from Bugsnag interface
    #514

    Enforce that config.maxBreadcrumbs must be between 0-100
    #511

    โž• Add unhandled property to BugsnagEvent
    #512

    ๐Ÿš€ Rename notifyReleaseStages to enabledReleaseStages
    #509

    โœ‚ Remove unused APIs from BugsnagSession interface
    #506

    ๐Ÿ“‡ Rename setUser/user interface on Bugsnag and BugsnagConfiguration
    #505

    ๐Ÿ“‡ Rename config.notifierType to config.appType
    #504

    โœ‚ Remove unused APIs on BugsnagEvent interface
    #498

    ๐Ÿ‘ Allow addition/removal of OnBreadcrumb callbacks
    #508

    โœ‚ Remove unused APIs from BugsnagMetadata interface
    #501

    โœ‚ Remove unused APIs from BugsnagConfiguration interface
    #496

    โœ‚ Remove unused APIs from BugsnagBreadcrumb interface
    #502

    โœ‚ Remove notify method variants from public api on Bugsnag
    #497

    โœ‚ Remove leaveBreadcrumbWithBlock from public api on Bugsnag
    #491

    BugsnagNotifier is now BugsnagClient
    #480

    โœ‚ Remove setSuspendThreadsForUserReported, setReportWhenDebuggerIsAttached, setThreadTracingEnabled, setWriteBinaryImagesForUserReported from public API.
    #468

    ๐Ÿ›  Fixes typo in BSG_KSCDeleteOnSuccess enumeration
    #317

    โž• Add a breadcrumb when Bugsnag first starts with the message "Bugsnag loaded"
    #445

    ๐Ÿ“‡ BugsnagMetaData is now BugsnagMetadata, including the configuration and event fields
    #450

    BugsnagCrashReport is now BugsnagEvent
    #449

    โž• Add a configuration option to filter breadcrumbs by type. Use
    config.enabledBreadcrumbTypes to enable or disable particular types of
    breadcrumbs from being captured.
    #476

    โž• Added a designated initializer to BugsnagConfiguration and removed functionality
    0๏ธโƒฃ from the default convenience init() to ensure that apiKey has a value set. The apiKey
    must now be a correctly formatted one to be accepted.

    • Swift: BugsnagConfiguration(_ apiKey)
    • Objective C: [[BugsnagConfiguration alloc] initWithApiKey:]

    #446
    #492

    ๐Ÿ‘Œ Support editing breadcrumbs within an Event as objects. Breadcrumbs can now be
    inspected and modified from callbacks, for example:

    Bugsnag.notifyError(error) { event in event.breadcrumbs?.forEach({ crumb inif crumb.message == "something specific" { crumb.message = "[redacted]" } }) }
    

    #474

    ๐Ÿ“‡ Bugsnag.addAttribute:value:tab: is now Bugsnag.addMetadataToSection:key:value:
    #454

    ๐Ÿ“‡ [Bugsnag clearTab:] is now [Bugsnag clearMetadataInSection:]
    ๐Ÿ“‡ (Swift: Bugsnag.clearMetadata(section:))
    #457

    ๐Ÿ”ง Renamed callback functions in the Configuration class:

    • beforeSendBlocks is now onSendBlocks (add using config.add(onSend: { ... }))

    - beforeSendSessionBlocks is now onSessionBlocks (add using config.add(onSession: { ... }))

    โž• Added [Bugsnag clearMetadataInSection:withKey:]
    ๐Ÿ“‡ (Swift: Bugsnag.clearMetadata(section:key:))
    #462

    โž• Added Bugsnag.getMetadata(_ section). The behaviour is: calling with a valid section
    ๐Ÿ“‡ name will return the metadata for that section if it exists, or nil if it does not exist. Other,
    similar functionality (e.g. BugsnagConfiguration.getTab() has been renamed and
    had usage aligned with this change.
    #459

    โž• Added Bugsnag.getMetadata(_ section: key:)
    #463

    โž• Add a per-Event apiKey property. This defaults to the global
    BugsnagConfiguration value but can be overridden in event passed to the
    Bugsnag.notify() callback.
    #458

    โž• Added Bugsnag.context, replicating the BugsnagConfiguration property. This is
    mutable and may be changed at any point. Changes are propagated to the BugsnagConfiguration
    property.
    #466

    Bugsnag.stopSession() is now Bugsnag.pauseSession(). This renaming has
    also been applied to the BugsnagNotifier and BugsnagSessionTracker classes.
    #464

    โž• Add a breadcrumb when network connectivity changes
    #448

    Breadcrumbs now take a message parameter that can now be arbitrarily long. This simplifies breadcrumb
    creation using Bugsnag.leaveBreadcrumb(string) so that the value is
    prominently displayed and is not truncated.
    #433

    โž• Add metadata accessor methods to BugsnagEvent
    #465

    โž• Added a user-configurable enabledErrorTypes property to BugsnagConfiguration.
    The BugsnagErrorTypes property allows users to choose which types of events are reported. If automatic crash detection
    is disabled this value is ignored. User-generated notify() events are reported in all cases.
    #477
    #561

    ๐ŸŒฒ Internal logging has been unified. Where before two preprocessor macros were
    ๐Ÿ”ง required to configure both Bugsnag and KSCrash portions, now the Bugsnag
    ๐ŸŒฒ BSG_LOG_LEVEL macro is sufficient to configure both. This should be set on the
    ๐Ÿ› Bugsnag framework build target. Further configuration instructions can be found in
    the BugsnagLogger.h header.
    #472

    โž• Added a method to allow merging supplied and existing Event metadata.
    ๐Ÿ“‡ BugsnagMetadata.addMetadataToSection:values: allows Event
    ๐Ÿ“‡ callbacks to modify Event metadata en-mass. Supplied metadata should
    ๐Ÿ“‡ be a JSON-serializable dictionary. The resulting Event metadata is the
    ๐Ÿ“‡ result of applying the following rules to the existing metadata for each supplied
    value:

    • Non-null values replace any existing key/value pair.
    • Null values remove a key/value pair.
    • Invalid values are logged and ignored.
      #470

    โœ‚ Remove Bugsnag.configuration()?. All access to the configuration object
    should be performed prior to calling Bugsnag.start().

    0๏ธโƒฃ User information is now persisted between application runs by default. When set a users'
    0๏ธโƒฃ email, id and name are set on BugsnagConfiguration they are stored in the User Defaults and
    ๐Ÿ“‡ restored if an application is restarted. The values are also copied to the configuration metadata.
    #469
    #590

    โž• Added callback-free method to leave breadcrumbs: [Bugsnag leaveBreadcrumbWithMessage:metadata:andType]
    ๐Ÿ“‡ (Swift: Bugsnag.leaveBreadcrumb(_, metadata:, type:))
    #482

    โž• Added removeOnSessionBlock() methods to both Bugsnag and BugsnagConfiguration to allow removal
    of callbacks run when a session starts.
    #483

    โž• Added addOnSendBlock:, removeOnSendBlock: to BugsnagConfiguration.
    #485
    #485

    โœจ Enhanced device orientation change breadcrumbs. These are now reported with "from" and "to" values
    in a form consistent with the Android notifier.
    #486

    ๐Ÿ“‡ The metadata interface is now consistent across the Bugsnag, BugsnagMetadata, BugsnagConfig, BugsnagClient and BugsnagEvent
    classes.
    #513

    ๐Ÿ”ง BugsnagClient now takes a shallow copy of the configuration passed in on initialisation.
    #524

    0๏ธโƒฃ The bundleVersion property is available on BugsnagConfiguration allowing overriding the default plist value.
    #550

    ๐Ÿ›ฐ Deliver each event in a separate request to avoid exceeding payload size limit
    #424