Crash your app in style (Golang)
    Parses panic stack traces, densifies and deduplicates goroutines with similar stack traces. Helps debugging crashes and deadlocks in heavily parallelized process.
    https://github.com/maruel/panicparse/tree/master/stack/webstack

    1. import (
    2. "log"
    3. "net"
    4. "net/http"
    5. "strings"
    6. "sync"
    7. "time"
    8. "github.com/maruel/panicparse/v2/stack/webstack"
    9. )
    10. func ExampleSnapshotHandler() {
    11. http.HandleFunc("/debug/panicparse", webstack.SnapshotHandler)
    12. // Access as http://localhost:6060/debug/panicparse
    13. log.Println(http.ListenAndServe("localhost:6060", nil))
    14. }

    go栈信息格式化
    datadog 开源的 go stack 输出解析工具。
    https://github.com/DataDog/gostackparse