Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for context.Context #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jan 9, 2020

  1. Removes honeybadger.SetContext and Client.SetContext

    Calling honeybadger.SetContext applies to all Go routines that use
    honeybadger.Notify or DefaultClient which means that setting values from
    one request could end up being reported in the error from a request on a
    different Go routine / thread. This API works fine in languages like
    Ruby which have thread local storage but I think it is too easily
    misunderstood and will likely cause problems so I've decided to remove
    it.
    gaffneyc committed Jan 9, 2020
    Configuration menu
    Copy the full SHA
    cdfc826 View commit details
    Browse the repository at this point in the history
  2. Add FromContext and Context.WithContext for lots of context

    This allows building up a honeybadger.Context riding along with a
    context.Context so it can be sent with errors. The goal is to make it so
    that the context sent to Honeybadger is tied to the request (or stack)
    rather than multiple requests clobbering the global state (see honeybadger-io#35).
    
    Fixes honeybadger-io#35
    Closes honeybadger-io#37
    gaffneyc committed Jan 9, 2020
    Configuration menu
    Copy the full SHA
    0b8b519 View commit details
    Browse the repository at this point in the history