errtrace VS ez

Compare errtrace vs ez and see what are their differences.

errtrace

An alternative to stack traces for your Go errors (by bracesdev)

ez

Minimalistic package for handling Go errors in an easy way (by Vanclief)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
errtrace ez
4 2
704 11
1.6% -
8.6 2.7
16 days ago 5 months ago
Go Go
BSD 3-clause "New" or "Revised" License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

errtrace

Posts with mentions or reviews of errtrace. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-29.
  • Error return traces for Go, inspired by Zig
    1 project | /r/programming | 2 Dec 2023
  • Show HN: Error return traces for Go, inspired by Zig
    1 project | /r/hackernews | 1 Dec 2023
    6 projects | news.ycombinator.com | 29 Nov 2023
    The README covers the idea behind errtrace in more details, but the primary difference is in what is captured:

    pkg/errors captures a stack trace of when the error occurred, and attaches it to the error. This information doesn't change as the error moves through the program.

    errtrace captures a 'return trace'--every 'return' statement that the error passes through. This information is appended to at each return site.

    This gives you a different view of the code path: the stack trace is the path that led to the error, while the return trace is the path that the error took to get to the user.

    The difference is significant because in Go, errors are just plain values that you can store in a struct, pass between goroutines etc. When the error passes to another goroutine, the stack trace from the original goroutine can become less useful in debugging the root cause of the error.

    As an example, the [Try it out](https://github.com/bracesdev/errtrace/#try-it-out) section in the README includes an example of a semi-realistic program comparing the stack trace and the return trace for the same failure.

ez

Posts with mentions or reviews of ez. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-29.
  • Show HN: Error return traces for Go, inspired by Zig
    6 projects | news.ycombinator.com | 29 Nov 2023
    While from a first instance, this package seems a bit overkill, I think the idea is interesting and is something that can be improved for Go.

    I also felt that Go errors where too bare-bones, so I developed a small package (https://github.com/Vanclief/ez) based on an awesome post that I saw here once. I use this package in all Golang code I touch.

  • Go Replaces Interface{} with 'Any'
    10 projects | news.ycombinator.com | 14 Dec 2021
    I used to really hate that. After reading this amazing post https://middlemost.com/failure-is-your-domain I created a module that makes this bearable https://github.com/Vanclief/ez

What are some alternatives?

When comparing errtrace and ez you can also consider the following projects:

go - The Go programming language

errors - Simple error handling primitives

go-formatter - A curated list of awesome Go frameworks, libraries and software

rustic_result - Result monad for Elixir inspired by Rust Result type

zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

v2ray-core - A platform for building proxies to bypass network restrictions.

traefik - The Cloud Native Application Proxy