Skip to content

Stop relying on pkg/errors to handle stack traces #70

Open
@knz

Description

@knz

Today the stack trace formatting code delegates to pkg/errors/stack.go.

However, that code uses runtime.FuncForPC and emits file paths in the stack trace derived from the raw file name of the source file.

This method is outdated, as the on-disk file name of a given package's source may be different from the package path (due to go mod versioning, reproducible build sandboxes, etc).

The "modern" equivalent is runtime.CallersFrame, which populates runtime.Frame structs with package path-qualified function names.

We want to use that instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions