enum BugsnagBreadcrumbType {
case error
case log
case manual
case navigation
case process
case request
case state
case user
}
Key Filters
Usually you will receive information such as headers, query params or post body fields in the reports from Bugsnag. To ensure that you do not track sensitive information, you can configure Bugsnag with a list of fields that should be filtered out:
Bugsnag 🐛
Reporting errors to Bugsnag.
📦 Installation
Integrating Bugsnag in your project
Update your
Package.swift
file.Update
configure.swift
Reporting
BugsnagMiddleware
will automatically report errors thrown by your route handlers. You can report errors manually fromApplication
orRequest
.By conforming to the
BugsnagError
protocol you can have full control over how your errors are reported. It has the following properties:shouldReport
Bool
false
true
severity
Severity
.info
|.warning
|.error
).error
metadata
[String: CustomDebugStringConvertible]
[:]
Users
Conforming your
Authenticatable
model toBugsnagUser
allows you to easily pair the data to a report.Configure all user models you would like Bugsnag to report.
Bugsnag will automatically check Vapor’s authentication API for the configured user types and report the user’s identifier if they are logged in.
Breadcrumbs
Breadcrumbs enable you to attach custom events to your reports. Leave a breadcrumb using the convenience function on
Request
.The breadcrumb types are provided by Bugsnag:
Key Filters
Usually you will receive information such as headers, query params or post body fields in the reports from Bugsnag. To ensure that you do not track sensitive information, you can configure Bugsnag with a list of fields that should be filtered out:
In this case Bugsnag Reports will hide header fields, query params or post body json fields with the keys/names email and password.
⚠️ Note: If key filters are defined and Bugsnag does not know how to parse the request body, the entire body will be hidden.
🏆 Credits
This package is developed and maintained by the Vapor team at Nodes.
📄 License
This package is open-sourced software licensed under the MIT license.