Skip to content

Related Tools

samber/do is a dependency injection framework based on Go’s type system. do-auditlog is a plugin for do v2 — it cannot function without it.

If you’re not using samber/do yet, check it out first:

Terminal window
go get github.com/samber/do/v2

go-output provides the rendering engines for Mermaid, PlantUML, DOT, D2, tree, and table export formats. do-auditlog depends on it for all diagram and table output.

If you need custom diagram generation outside of do-auditlog, go-output is a standalone library with validated escaping for every format.

Companion projects by the same author, used by or complementary to do-auditlog:

Library What it does
go-health Kubernetes-style health probes for samber/do v2; Plugin implements its recorder interface
go-workflow-auditlog The same audit-log pattern for workflow engines — same export formats, same schema ideas
go-sse Server-Sent Events toolkit powering the live dashboard
go-ndjson NDJSON read/write and format detection behind the event-stream exports

md-go-validator validates code blocks in Markdown and MDX files. This website’s CI uses it to ensure code examples are syntactically valid Go.

Tool Scope How It Compares
do-auditlog samber/do v2 only Full lifecycle audit with 16+ export formats and HTML visualization
wire analyze google/wire Compile-time only — no runtime audit
dig introspection uber/dig dig.Container.Visualize for graph output, no event timeline

Use Config.OnEvent to stream metrics:

plugin, _ := auditlog.New(auditlog.Config{
Enabled: true,
OnEvent: func(ev auditlog.Event) {
if ev.Phase == auditlog.PhaseAfter && ev.EventType == auditlog.EventTypeInvocation {
invocationDuration.Observe(ev.Duration().Seconds())
}
},
})
plugin, _ := auditlog.New(auditlog.Config{
Enabled: true,
OnEvent: func(ev auditlog.Event) {
if ev.EventType == auditlog.EventTypeInvocation && ev.Phase == auditlog.PhaseAfter {
_, span := tracer.Start(context.Background(), ev.ServiceName)
defer span.End()
}
},
})