Skip to content

feature idea: Realm Probe #4206

Open
Open
@n2p5

Description

@n2p5

Description

In working through the new cross-realm spec in code. I find myself having to dig into which realm I'm hanging out in across various functions. I'd love a way to use a "probe" to give me the "realm stack" at some point in the code.

Imagine something like:

realm.Probe("my annotation")

// Probe Annotation: my annotaiton
// Realm Layer         Address        pkgPath
//   0 (current)        g1...           gno.land/r/foo
//   1                  g1...           gno.land/r/bar
//   2 (origin)         g1...                           

Maybe have the ability to use an IO Writer or some other way to redirect so it can be gathered, or fed into a structured logging. But for debuggin purposes, this would be really nice to have a "one liner" where I throw in an annotation and it outputs my annotation at that point in the code + the Realm Layers so that I understand what realm context I'm in at that point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions