kinbiko / bugsnag

Well-documented, maintainable, idiomatic, opinionated, and *unofficial* rewrite of the Bugsnag Go notifier
MIT License
3 stars 0 forks source link

Trace - Better user-specified stacktraces. #26

Closed kinbiko closed 3 years ago

kinbiko commented 4 years ago

Let users specify the arguments that were given to a function, and have it show up in the stacktrace.

func (s *service) someMethod(ctx context.Context, arg1 string, arg2 int) error {
    ctx = s.notifier.Trace(ctx, arg1, arg2)
    // ... rest of the logic
}

Can extract the method name automatically, but this time we can attach argument values in the stacktrace. Or maybe this is maybe just a shorthand for doing breadcrumbs?