Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Fang-
Copy link
Collaborator

@Fang- Fang- commented Apr 8, 2024

Primarily: adds a new subscription endpoint to /lib/verb (/verb/events-plus), which emits a new "verb event" type, $event-plus:verb. This type includes many details not present in the $event:verb type or the library's slog output, such as the src.bowl, n/ack status, mug hashes of included data, and a summary of the produced effects/cards.

Secondarily: adds two pieces of tooling for working with this new endpoint:

  • /app/verb-logger, which can be set up to watch an agent, and writes out json files for that agent's logs to pier/.urb/put/verb-logger/[agent] periodically. (Currently hard-coded at once an hour, can be force-flushed to export earlier. Probably don't run this long-term without a "delete old logs" companion script.)
  • A log viewer in the debug dashboard for rendering & inspection of logs of any number of agents on a chronological timeline. This log viewer can import the files output by /app/verb-logger, or can ingest events from running agents directly, similar to the pre-existing /lib/verb support in the debug dashboard.

Demo:

debug-log-viewer.mov

Tertiarily: moves the debug dashboard off of gulp (old and busted) onto vite (new hotness) for its build system. We continue to copy the resulting blobs directly into the pier, because we're mischievous little imps that want to see %tomb become load-bearing. (Making /app/dbug issue %tomb cards is left as an exercise to the reader.)

Of course, usage of this new functionality for any given agent depends on that agent using the new version of /lib/verb.

There's probably better ways to visualize the log viewer timeline. There's tons of stuff to be done with color-coding, same-event batches could be displayed differently, etc. Even just a better slice selector would be cool. But the current things is perfectly good enough for basic browsing & insights, so further improvements are out of scope here.

One might be concerned with the additional processing done by /lib/verb with this change, but: 1) it's all pattern-matching, mug calculation, and cell construction, all of which should be fast, 2) json conversions don't happen unless you're actively watching, 3) log-viewer only serializes periodically.

Fang- added 18 commits March 25, 2024 19:39
Adds a new endpoint to the verb wrapper library that gives more detail
about events happening to agents. This includes sequence numbers,
timestamps, source ship, mug hashes for incoming data, and a summary of
the resulting effects.
A utility agent that can be told to watch agents. Doing so will make it
subscribe to that agent's "verb plus" events. Verb-logger buffers those,
and flushes them to unix disk in a json format periodically.

Tools for viewing these logs still in development...
Include the mug for poke data, mark for facts, separate out the on-agent
sign explicitly.
Using the timestamp of the first event, instead of the start of the time
block.

Also narrow the time block down from a day to an hour, for faster log
writes. Further experimentation needed here.
Needs usability improvements for event details, range selection, among
other things.
And lets you click events to make their details sticky.

Also improves date rendering in some places.
Also prefixes marks with %, mugs with 0x, always.
Forget flavor-of-the-month, gulp expired _years_ ago.
New verb watching button added next to the existing one. Instead of
rendering logs to text in the apps view, adds events into the logs view.
Lossy, but if the original ms timestamp came out of an urbit, it was
already lossy anyway.
It doesn't contain anything by default, so is easier to scroll
past/doesn't need to be collapsed to get to the verb buttons.
Not sure why this one was added in.
Copy link
Collaborator

@patosullivan patosullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JS/vite related changes look good

@pkova pkova merged commit 76aa924 into develop Apr 10, 2024
@pkova pkova deleted the m/verb-plus branch April 10, 2024 14:49
@arthyn
Copy link
Collaborator

arthyn commented Apr 11, 2024

@Fang- you're doing holy work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants