errtrace

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

Errtrace Alternatives

Similar projects and alternatives to errtrace

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better errtrace alternative or higher similarity.

errtrace reviews and mentions

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.

  • A note from our sponsor - InfluxDB
    www.influxdata.com | 9 May 2024
    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. Learn more →

Stats

Basic errtrace repo stats
4
696
8.6
3 days ago

bracesdev/errtrace is an open source project licensed under BSD 3-clause "New" or "Revised" License which is an OSI approved license.

The primary programming language of errtrace is Go.


Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com