A Go error handling library providing readable stack traces, flexible formatting, and seamless integration with existing error types.
Eris is a Go error handling library that provides readable stack traces and flexible formatting options. It improves debugging by offering detailed error context with customizable output formats, while maintaining compatibility with existing error libraries like pkg/errors and xerrors.
Go developers who need enhanced error debugging with clear stack traces, especially those working on applications requiring detailed error logging, monitoring, or integration with error tracking systems like Sentry.
Developers choose Eris for its highly readable stack traces that omit runtime noise, its support for both string and JSON output with inversion and custom separators, and its seamless integration with other error libraries while offering unique features like Sentry integration and custom formatting.
Error handling library with readable stack traces and flexible formatting support 🎆
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Omits runtime package frames and orders traces logically, starting with the calling method to speed up debugging, as shown in the comparison with pkg/errors.
Supports both string and JSON output with inversion options and custom separators, enabling easy integration with structured loggers like Logrus.
Works with errors from pkg/errors and xerrors, allowing migration without breaking existing error inspection via Is, As, and Cause.
Includes built-in support for sending formatted error traces to Sentry, simplifying error tracking setup with example code provided.
The eris.Is function compares error messages rather than types, which can be unreliable if messages are dynamic or change, as noted in the README.
Stack traces are always captured when creating errors, adding memory and performance overhead even for simple errors that may not need tracing.
Writing custom output formats requires deep understanding of the UnpackedError structure, which may be cumbersome for users who just need basic logging.