Bugsnag v6.0.0 Release Notes

Release Date: 2020-06-22 // 14 days 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

    The comparison of redacted keys is now case-insensitive

    Unified the three main XCode projects

    0️⃣ Alter default session background timeout to 30s

    👌 Support loading configuration from values in Info.plist.

    ➕ Add unhandledRejections to BugsnagErrorTypes

    📇 Rename Bugsnag start methods

    📇 Rename OnSend to OnSendError

    ➕ Add onCrashHandler data to BugsnagEvent metadata

    📇 Rename BugsnagUser properties

    👉 Make BugsnagOnErrorBlock return BOOL rather than void

    🔌 Make BugsnagPlugin take BugsnagClient as param

    👉 Make user editable on BugsnagEvent

    ➕ Add getter for Bugsnag.context

    👉 Make BugsnagUser properties readonly

    ➕ Add sendThreads property to BugsnagConfiguration

    Hide additional methods from public API

    🔧 Move codeBundleId from configuration to non-public client property

    ➕ Add structured app/device fields to BugsnagSession

    ➕ Add redactedKeys for removing sensitive values from metadata

    🔧 Move endpoint configuration to class

    👉 Make all callbacks return boolean values

    ➕ Add originalError property to BugsnagEvent

    ✂ Remove attachCustomStacktrace from public API

    Create structured BugsnagError class

    Create structured BugsnagThread class

    Convert event.device from NSDictionary to a structured class

    Create structured BugsnagStackframe class

    Convert event.app from NSDictionary to a structured class

    👉 Make BugsnagClient a public interface

    ✂ Remove unused APIs from Bugsnag interface

    Enforce that config.maxBreadcrumbs must be between 0-100

    ➕ Add unhandled property to BugsnagEvent

    🚀 Rename notifyReleaseStages to enabledReleaseStages

    ✂ Remove unused APIs from BugsnagSession interface

    📇 Rename setUser/user interface on Bugsnag and BugsnagConfiguration

    📇 Rename config.notifierType to config.appType

    ✂ Remove unused APIs on BugsnagEvent interface

    👍 Allow addition/removal of OnBreadcrumb callbacks

    ✂ Remove unused APIs from BugsnagMetadata interface

    ✂ Remove unused APIs from BugsnagConfiguration interface

    ✂ Remove unused APIs from BugsnagBreadcrumb interface

    ✂ Remove notify method variants from public api on Bugsnag

    ✂ Remove leaveBreadcrumbWithBlock from public api on Bugsnag

    BugsnagNotifier is now BugsnagClient

    ✂ Remove setSuspendThreadsForUserReported, setReportWhenDebuggerIsAttached, setThreadTracingEnabled, setWriteBinaryImagesForUserReported from public API.

    🛠 Fixes typo in BSG_KSCDeleteOnSuccess enumeration

    ➕ Add a breadcrumb when Bugsnag first starts with the message "Bugsnag loaded"

    📇 BugsnagMetaData is now BugsnagMetadata, including the configuration and event fields

    BugsnagCrashReport is now BugsnagEvent

    ➕ Add a configuration option to filter breadcrumbs by type. Use
    config.enabledBreadcrumbTypes to enable or disable particular types of
    breadcrumbs from being captured.

    ➕ 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:]


    👌 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]" } }) }


    📇 Bugsnag.addAttribute:value:tab: is now Bugsnag.addMetadataToSection:key:value:

    📇 [Bugsnag clearTab:] is now [Bugsnag clearMetadataInSection:]
    📇 (Swift: Bugsnag.clearMetadata(section:))

    🔧 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:))

    ➕ 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.

    ➕ Added Bugsnag.getMetadata(_ section: key:)

    ➕ 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.

    ➕ Added Bugsnag.context, replicating the BugsnagConfiguration property. This is
    mutable and may be changed at any point. Changes are propagated to the BugsnagConfiguration

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

    ➕ Add a breadcrumb when network connectivity changes

    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.

    ➕ Add metadata accessor methods to BugsnagEvent

    ➕ 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.

    🌲 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.

    ➕ 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

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

    ✂ 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.

    ➕ Added callback-free method to leave breadcrumbs: [Bugsnag leaveBreadcrumbWithMessage:metadata:andType]
    📇 (Swift: Bugsnag.leaveBreadcrumb(_, metadata:, type:))

    ➕ Added removeOnSessionBlock() methods to both Bugsnag and BugsnagConfiguration to allow removal
    of callbacks run when a session starts.

    ➕ Added addOnSendBlock:, removeOnSendBlock: to BugsnagConfiguration.

    ✨ Enhanced device orientation change breadcrumbs. These are now reported with "from" and "to" values
    in a form consistent with the Android notifier.

    📇 The metadata interface is now consistent across the Bugsnag, BugsnagMetadata, BugsnagConfig, BugsnagClient and BugsnagEvent

    🔧 BugsnagClient now takes a shallow copy of the configuration passed in on initialisation.

    0️⃣ The bundleVersion property is available on BugsnagConfiguration allowing overriding the default plist value.

    🛰 Deliver each event in a separate request to avoid exceeding payload size limit

Previous changes from v6.0.0-rc9