Skip to content

v0.34.0 — composable dispatch hooks

Choose a tag to compare

@rustyconover rustyconover released this 08 Oct 15:18
· 3 commits to main since this release

A server can now run several dispatch hooks at once — an access log, Sentry and OpenTelemetry together — without a hand-written fan-out hook.

  • vgirpc.MultiDispatchHook(hooks...) composes hooks: starts run in order with context chaining, ends run in reverse, and a panicking hook is isolated from the rest.
  • Server.AddDispatchHook(hook) adds a hook alongside those installed; SetDispatchHook still replaces.
  • Server.DispatchHook() returns the installed hook.

vgirpc/otel v0.20.0 and vgirpc/sentry v0.17.0 switch their instrumenters to AddDispatchHook. See Combining hooks.

Full Changelog: v0.33.2...v0.34.0