Skip to content

Latest commit

 

History

History
781 lines (532 loc) · 23.6 KB

CHANGELOG.md

File metadata and controls

781 lines (532 loc) · 23.6 KB

Changelog

v4.7.1 (2024-05-22)

Bug fixes

  • Avoid reading __code__ when setting a custom delivery unless it exists #387

v4.7.0 (2024-04-24)

Enhancements

v4.6.2 (2024-03-05)

Bug fixes

  • Ensure sessions are sent at exit #371

v4.6.1 (2023-12-11)

Bug fixes

  • Avoid using deprecated flask.__version__ attribute #365
  • Ensure the session delivery queue is started regardless of auto_capture_sessions configuration #367

v4.6.0 (2023-09-05)

Enhancements

  • Add support for feature flags & experiments #350 #351

  • Remove use of deprecated pkg_resources module #362

v4.5.0 (2023-07-17)

Enhancements

  • The exception's __notes__ field will now be sent as metadata if it exists #340 0HyperCube

  • Allows changing the grouping hash when using BugsnagHandler via the logger methods' extra keyword argument #334 0HyperCube

  • PathLike objects are now accepted as the project path #344 0HyperCube

Bug fixes

  • Fixes one of the fields being mistakenly replaced with [RECURSIVE] when encoding a list or dictionary with identical siblings but no recursion. #341 0HyperCube

  • Fix the ignore class list not accounting for nested classes #342 0HyperCube

v4.4.0 (2023-02-21)

Enhancements

  • Sub-exceptions will now be reported when an ExceptionGroup or BaseExceptionGroup is passed to bugsnag.notify. This includes support for the backports provided by the exceptiongroup package #332 #338

v4.3.0 (2022-11-02)

Enhancements

  • Allow preventing an exception from being reported to Bugsnag by setting the skip_bugsnag attr to True #325

  • Prevent duplicate events from being notified in the Django integration #326

v4.2.1 (2022-05-16)

Bug fixes

  • Apply params_filters to URLs in request metadata #318

v4.2.0 (2022-02-18)

Enhancements

  • Report the entire exception chain by traversing the __cause__ and __context__ of exceptions to provides greater context into the cause of exceptions #299 Diego Restrepo Mesa #314
  • Use the __traceback__ attribute in Python 3 exception objects to improve stacktraces for handled errors #313

Note: The use of __traceback__ for the stacktraces of handled events means that the grouping of these errors on your Bugsnag dashboard will be affected when this attribute is available: it will now show the location of the exception and not the call to notify.

Bug fixes

  • Prevent async delivery errors from escaping their thread #303

4.1.1 (2021-10-04)

Bug fixes

  • Fix error in ASGI middleware if the ASGI client is None #296

4.1.0 (2021-06-23)

Enhancements

Bug fixes

4.0.3 (2021-04-28)

Bug fixes

4.0.2 (2020-12-03)

Bug fixes

  • Fixed an issue preventing code being fetched from files in the project root but not in the PWD #246

4.0.1 (2020-10-06)

Bug fixes

  • Fix issue where types were not packaged with the library

4.0.0 (2020-10-01)

This is a major release which adds new features while removing previously deprecated portions of the library. For a guide to upgrading your existing codebase, see the upgrade guide.

Breaking Changes

The minimum supported Python version is now 3.5. Older versions of Python are now at end-of-life. Please upgrade.

  • Added __all__ lists throughout to indicate the boundaries of the public interface. This may affect your integration if using import *.

  • Removed Configuration.use_ssl and Configuration.get_endpoint() in favor of including the protocol in Configuration.endpoint

  • Configuration.send_environment is now False by default. Enable it as a part of your configuration to send the full request context (if any) as a part of each event.

  • Removed bugsnag.utils.ThreadLocals as it has been superseded by the contextvars API

  • Removed bugsnag.utils.merge_dicts, an unused helper function

  • Removed bugsnag.send_sessions

Deprecations

  • Deprecated bugsnag.notification.Notification in favor of bugsnag.event.Event to better align with Bugsnag libraries on other platforms. The Notification class is functionally equivalent and will be removed in a future release.
  • Event.meta_data has been renamed to Event.metadata
  • RequestConfiguration.meta_data has been renamed to RequestConfiguration.metadata

Enhancements

  • Added a request property to Event. Events created by errors which occur in the HTTP request cycle (when using the integrations for Django, Flask, WSGI, or Tornado) will have the request object available. The request object can be used to add custom information to the Event which will be sent to Bugsnag. The request object itself is not serialized.

  • Added type signatures throughout the library

  • [WSGI] Use X-Forwarded-For header if present to determine the IP address used as the default user ID. The remote address remains available in the request metadata attached to the event. Wolfgang Schnerring #133

3.9.0 (2020-08-27)

Enhancements

  • Support reporting exceptions thrown from threads using threading.excepthook #218
  • [Django] Capture errors which occur outside of the request/response middleware chain, like uncaught exceptions within 404 or 500 handlers. #221

3.8.0 (2020-08-18)

Enhancements

  • Support forcing an individual event to be sent synchronously to Bugsnag. Given a configuration where asynchronous=True (the default setting), use notify(ex, asynchronous=False) to block until the event is delivered. #207

  • Support configuring app type, which is a searchable field on the Bugsnag dashboard. Set Configuration.app_type to add a type property to the app metadata of an event. #212

  • Support disabling automatic attachment of the request environment to events. Set Configuration.send_environment to False to remove the metadata. #214

  • [ASGI] Collect request enviroment in an "environment" metadata section #214

Fixes

  • Warn for incorrectly typed configuration options #211

  • Warn if running under uWSGI without thread support #215

  • Fix missing reports from failed celery tasks when the worker would terminate prior to the event being sent to bugsnag #207

  • [Django] Fix missing event context when a route did not have a name. Routes without names will now use the namespace-qualified view function name. #210

3.7.1 (2020-07-30)

Fixes

  • Ensure session counts on events do not increment with future events by copying the session information into each event #201

  • Fix erroneously delivered sessions when session tracking is disabled by release stages #202

3.7.0 (2020-07-27)

Enhancements

  • Enable session tracking by default. This feature powers stability metrics on the Bugsnag dashboard. #194

  • Support reporting events from ASGI-based web servers and frameworks. See the documentation for more information about getting started. #195

  • [Django, Tornado] Add parsed JSON body content to events for requests with JSON content types. The body content can be filtered on the Bugsnag dashboard #192

Fixes

  • Fix diagnostic data being swapped between contexts and attached to an unrelated Bugsnag event when using asyncio features #199

3.6.1 (2020-06-04)

Fixes

  • WSGI middleware will no longer raise when given a badly encoded URL #188

3.6.0 (2019-06-25)

Enhancements

  • Add Python version string to report and session payloads (device.runtimeVersions) #179

Fixes

  • Ensure nested dicts are not truncated prematurely when checking for recursion due to over-aggressive object id matching #181

3.5.2 (2019-03-15)

Fixes

  • Ensure request tab is attached to Flask requests when JSON data is malformed or otherwise cannot be read at crash time #176

3.5.1 (2019-02-04)

Fixes

  • Ensure metadata keys are safely stringified before serialization Brock Haywood #163

  • Remove non-essential packages from distribution #173

3.5.0 (2018-12-13)

Enhancements

  • Separate middleware stacks, ensuring Bugsnag middleware is always run before user-added middleware, giving user callbacks full control over captured data. #166

3.4.3 (2018-08-30)

Fixes

3.4.2 (2018-03-07)

Fixes

  • Fix cases where parts of a payload could be erroneously trimmed as a recursive value #147

  • Apply payload filters to device and user metadata #146

3.4.1 (2018-02-22)

Fixes

  • Ensure correct usage of is_authenticated in Django applications #143

  • Allow exception option to override a logged exception in handler callbacks #141

3.4.0 (2018-01-09)

Enhancements

  • Add support for tracking sessions and overall crash rate by setting auto_capture_sessions in configuration options Alex Moinet #135

3.3.0 (2017-11-02)

Enhancements

  • Adds support for Django 2.0 Denis #130

  • Updates and improves Python examples #128

3.2.0 (2017-09-27)

Enhancements

  • Track difference between handled and unhandled exceptions #127

3.1.2 (2017-09-18)

Enhancements

  • Added flask example app #122

  • Added example for using celery with django #124

  • Added issue template #125

Bug fixes

  • Fixed context being overridden in flask notifier #123

3.1.1 (2017-06-08)

Bug fixes

  • Fix possible stack overflow when using a log handler and not specifying an API key #120

  • Fix traceback_excludes_modules when using compiled Python modules Kobi Meirson #119

3.1.0 (2017-02-24)

Enhancements

Bug fixes

  • Fix over-filtering of payload data when filters matched payload fields #116 #117

3.0.0 (2016-10-31)

This is a major release adding a number of new features and deprecating some lesser used parts of the library.

Enhancements

  • Add compatibility with Django 1.10 Jonny Pickett #108

  • Support customizing delivery and sending error reports using requests.

    The new Delivery class is a generic way of sending a serialized payload to Bugsnag. The Configuration class now has a delivery property which should be an instance of Delivery. By default, if requests is installed, reports are sent via bugsnag.delivery.RequestsDelivery rather than bugsnag.delivery.UrllibDelivery.

    To enforce using urllib2/urllib3, use UrllibDelivery:

    from bugsnag.delivery import UrllibDelivery
    
    bugsnag.configure(delivery=UrllibDelivery())

    To use a custom Delivery:

    from bugsnag.delivery import Delivery
    
    class SomeSpecialDelivery(Delivery):
    
        def deliver(self, config, payload):
            send_to_my_queue(config.get_endpoint(), config.proxy_host, payload)
    
    bugsnag.configure(delivery=SomeSpecialDelivery())

    Graham Campbell Delisa Mason #86

  • Support multiple clients in a single environment using bugsnag.Client. A new client can be initialized using a Configuration or options passed to Client(). By default, a client is installed as the system exception hook. To disable this behavior, set install_sys_hook to False.

    client = Client(api_key='...')
    config = Configuration(api_key='...')
    client = Client(config)

    Kyle Fuller #101

  • Support running a block of code within a client's context. Any exception raised will be reported.

    with client.capture():
        raise Exception('an exception reported to Bugsnag then reraised')

    Specific types of exceptions can be captured by adding exceptions as a tuple.

    with client.capture((TypeError,)):
        raise Exception('an exception which does not get captured')

    Additional options can be passed to th resulting error report, such as attached metadata or severity.

    with client.capture(account_id='123', severity='info'):
        raise Exception('failed to validate record')

    Functions can be decorated to capture any exceptions thrown during execution.

    @client.capture
    def foo():
        raise Exception('an exception passed to Bugsnag then reraised')
    
    @client.capture((TypeError,))
    def bar():
        raise Exception('an exception which does not get captured')
    
    @client.capture(test_slice='B')
    def baz():
        raise Exception('an exception passed to Bugsnag then reraised')

    Kyle Fuller Delisa Mason #101

  • Support creating a log handler from a client, and forwarding logged messages to Bugsnag.

    client = Client(api_key='...')
    logger = logging.getLogger(__name__)
    
    logger.addHandler(client.log_handler())

    Log messages can also be customized using additional information from the log record and callbacks:

    client = Client(api_key='...')
    logger = logging.getLogger(__name__)
    handler = client.log_handler()
    
    def add_extra_info(record, options):
        if 'meta_data' not in options:
            options['meta_data'] = {}
    
        options['meta_data']['stats'] = {
          'account_id': record.account_id,
          'ab_test_slice': record.slice_name
        }
    
    handler.add_callback(add_extra_info)
    logger.addHandler(handler)

    BugsnagHandler argument api_key was deprecated as a part of this change.

    Delisa Mason #103

  • Replace existing logging with a logger. Logs from bugsnag can now be controlled by setting the log level of logging.getLogger('bugsnag'). Kyle Fuller #95

  • Wrap non-Exception objects passed to notify() in a RuntimeError Delisa Mason #98

Bug fixes

  • Fix proxy configuration setting a global opener Kyle Fuller #97

  • Fix dropped reports during fatal errors occuring before threads join Delisa Mason #99

  • Fix missing error reports when invoking a function decorated with a Bugsnag client using the wrong arguments Delisa Mason #110

2.5.2 (2016-08-19)

Enhancements

  • Log exception message when notifications fail to send

Bug Fixes

  • Improve recursion handling in metadata parsing

2.5.1 (2016-08-12)

Bug Fixes

  • Fix setting api_key and grouping_hash from notify() or before_notify()
  • Fix merge behavior when overriding metadata from notify()

2.5.0 (2016-06-14)

Enhancements

Bug Fixes

  • Fix an issue where the package version is marked as "unknown" Kyle Fuller #83

  • Fix an issue where request metadata is not sent when not using SessionMiddleware in Django

2.4.0 (2016-01-18)

Enhancements

Bug Fixes

  • Remove use of deprecated request.REQUEST attribute in favor of GET/POST Delisa Mason #69

  • Fix user attribute logging for Django custom authentication setups Delisa Mason #76 #78

2.3.1

  • Redact HTTP_COOKIE and HTTP_AUTHORIZATION by default

2.3.0

  • Add add_metadata_tab method
  • Fix Flask integration overriding user information

2.2.0

  • Optionally send a snippet of code along with each frame in the stacktrace
  • Default to https:// for reports.

2.1.0

  • Allow custom meta-data when using the Bugsnag log handler (thanks @lwcolton!)
  • Update flask support for python 3.4 (thanks @stas!)
  • Show json post body for flask requests (thanks @stas!)

2.0.2

  • Better logging support
  • More robustness for notifies during shutdown
  • Call close() on WSGI apps that are only iterable, not iterators

2.0.1

  • Now works on Python 3.2

2.0.0

  • Read request-local settings in bugsnag.notify
  • Add support for before_notify callbacks
  • Avoid truncating values when unnecessary
  • Send user data to bugsnag for django

1.5.0

  • Send 'severity' of error to Bugsnag
  • Add 'payloadVersion'

1.4.0

  • Make params_filter configuration work

1.3.2

  • Allow custom groupingHash

1.3.1

  • Send hostname to Bugsnag

1.3.0

  • Added celery integration

1.2.7

  • Configure the log handler in the constructor for when called from cron job.

1.2.6

  • Read the API key from the environment for Heroku users
  • Best guess a project_root for a sensible default

1.2.5

  • Add blinker as a dependency, makes using Bugsnag with Flask easier

1.2.4

  • Removed automatic userId population from username in django, to avoid a database lookup

1.2.3

  • Fix cookies bug in Tornado apps

1.2.2

  • Added support for Tornado apps

1.2.1

  • Additional protection for bad string encodings

1.2.0

  • Fixed issue when non-unicode data was passed in metadata
  • Filters are now applied for substring matches ("password" will now also match "confirm_password")
  • Ignore django.http.Http404 exceptions by default when using django middleware

1.1.2

  • Log trace when HTTP exception

1.1.1

  • Log the trace when theres an exception notifying