Export Formats
Overview
Section titled “Overview”do-auditlog supports multiple export formats for different use cases — from structured data for tooling to visual diagrams for documentation.
Data Formats
Section titled “Data Formats”JSON Report
Section titled “JSON Report”Full snapshot: event timeline, service summaries with forward and reverse dependencies, scope tree, and aggregate metrics.
plugin.ExportToFile("audit.json")// or to any io.Writer:plugin.WriteReportJSON(os.Stdout){ "version": "0.2.0", "container_id": "my-app", "service_count": 3, "event_count": 20, "services": [ { "service_name": "*main.UserService", "invocation_count": 1, "first_build_duration_ms": 9.079, "dependencies": [ { "scope_name": "[root]", "service_name": "*main.Database" } ] } ]}NDJSON Event Stream
Section titled “NDJSON Event Stream”One JSON object per line. Feed it into log aggregators, stream processors, or custom tooling.
plugin.ExportEventsToNDJSON("events.ndjson")CSV / TSV
Section titled “CSV / TSV”Tabular export of all services for spreadsheets and data analysis:
plugin.ExportToCSV("services.csv")plugin.ExportToTSV("services.tsv")Visualization Formats
Section titled “Visualization Formats”A single, self-contained dark-themed HTML page. No external JS/CSS. Works offline.
plugin.ExportToHTML("audit.html")The HTML includes:
- Stats cards (services, events, scopes, health status)
- Services table with type badges, status, build time
- Scopes tab with collapsible tree
- Dependency graph with pan/zoom
- Timeline with dual build+shutdown bars
- Events table with type filter chips
Mermaid
Section titled “Mermaid”Flowchart for GitHub READMEs, GitLab, Notion:
plugin.Report().WriteMermaid(os.Stdout)PlantUML
Section titled “PlantUML”Component diagram for IntelliJ, GitLab, online editors:
plugin.Report().WritePlantUML(os.Stdout)Graphviz digraph for dot -Tsvg graph.dot:
plugin.Report().WriteDOT(os.Stdout)Modern diagram format for the D2 playground:
plugin.Report().WriteD2(os.Stdout)ASCII dependency tree or HTML nested list:
plugin.WriteTree(os.Stdout) // ASCII treeplugin.WriteHTMLTree(os.Stdout) // HTML nested listService summary in 16+ formats via go-output:
plugin.WriteTable(os.Stdout, "markdown") // table, json, csv, markdown, yaml, html...Diagram Theming
Section titled “Diagram Theming”All four diagram formats share the warm-amber per-node style (fill:#e8a838, stroke:#4a4030, font:#14110d) via go-output’s NodeStyle. Two visual elements are not emitted because go-output’s renderers lack graph-level attribute setters: the DOT dark canvas background (bgcolor) and edge line-colors.
Choosing a Format
Section titled “Choosing a Format”| Use Case | Format | Why |
|---|---|---|
| CI/CD artifact | JSON | Structured, parseable, version-controlled schema |
| Log aggregator | NDJSON | Line-delimited, stream-friendly |
| Manual inspection | HTML | Self-contained, visual, offline |
| Documentation | Mermaid | Renders natively on GitHub |
| Presentations | PlantUML / D2 | Polished, modern look |
| Data analysis | CSV / TSV | Spreadsheet-ready |