`jhack tail` v2

See also: Exploring event emission sequences with jhack tail

Given the success of jhack tail, and the steady stream of questions like

  • how does event deferral work?
  • when does a deferred event get reemitted?
  • what happened to [this event] as it got deferred? Did it got reemitted? Can you find it in this debug-log?

I’ve spent some time updating jhack tail with some defer-related visuals.

First, just like before this update, you need to configure the model to log all event-related things. You can get there by running:

juju model-config logging-config="<root>=WARNING;unit=DEBUG"

You now can jhack tail -d -n and get a pretty-printed visualization of what happened to your events.

image

Note: This was a tester charm I developed which does little more than randomly defer update-status events.

Things can get complicated but should remain consistent: image

The numbers you see on the left column, which ops associates with each deferred event, are used to match deferrals with re-emittals, to ensure that it’s the very same event, which we are talking about. They can be omitted by getting rid of that -n flag.

And, as you see, it now has colors!

1 Like