Log Sequence Diagram Converter

Convert structured service logs into Mermaid or PlantUML sequence diagrams, with optional latency and error annotations

Paste JSON lines or trace-style text logs, or upload a log file. The tool first parses interaction-like events such as serviceA -> serviceB or structured JSON with source / target / action fields, then generates a sequence diagram in Mermaid or PlantUML.

How to use it:

  • Log Input / Log File: provide logs that contain cross-service interaction hints
  • Diagram Format: choose Mermaid or PlantUML
  • Include Latency Notes: adds per-step latency markers where available
  • Highlight Errors: annotates failing steps with error notes
  • Max Steps: compresses the output so the diagram stays readable

Supported patterns:

  • JSON lines with fields like source, target, action, status, latencyMs, error
  • arrow logs such as api -> auth POST /login | status=401 | latency=82ms
  • trace-style lines such as [api] GET /users -> [db] 200 14ms

Output:

  • compact interaction summary
  • Mermaid or PlantUML sequence diagram source
  • AI-assisted summarization when possible, with heuristic fallback when AI is unavailable

Example Results

1 examples

Turn a microservice login trace into a Mermaid sequence diagram

Summarize a login failure path with service hops, latency notes, and the failing auth step highlighted in the resulting diagram.

Summary
- Title: Service interaction trace

Diagram
```mermaid
sequenceDiagram
participant api
...```
View input parameters
{ "logInput": "2026-04-06T10:00:01Z api -> auth POST /login | status=401 | latency=82ms | error=invalid token\n2026-04-06T10:00:01Z auth -> user-db SELECT user_by_email | status=200 | latency=14ms\n2026-04-06T10:00:02Z api -> audit POST /events | status=202 | latency=11ms", "logFile": "", "diagramFormat": "mermaid", "includeLatencyNotes": true, "highlightErrors": true, "maxSteps": 12 }

Click to upload file or drag and drop file here

Maximum file size: 20MB Supported formats: application/json, text/plain, text/log, .log, .txt, .jsonl

Key Facts

Category
Developer & Web
Input Types
textarea, file, select, checkbox, number
Output Type
text
Sample Coverage
4
API Ready
Yes

Overview

The Log Sequence Diagram Converter transforms structured service logs and trace data into clear, visual Mermaid or PlantUML sequence diagrams. By parsing JSON lines or trace-style text logs, this tool automatically maps cross-service interactions, annotates latency, and highlights errors, making it easier to debug microservice architectures and document system behavior.

When to Use

  • When debugging failed requests across multiple microservices to pinpoint exactly where an error occurred.
  • When documenting system architecture and API interactions based on real production traffic logs.
  • When analyzing performance bottlenecks by visualizing service hops and step-by-step latency.

How It Works

  • Paste your structured logs (JSON lines, arrow logs, or trace-style text) or upload a .log or .jsonl file.
  • Select your preferred diagram format (Mermaid or PlantUML) and configure options like latency notes and error highlighting.
  • Set a maximum step count to compress the output and ensure the diagram remains readable.
  • The tool parses the source, target, and action fields to generate a compact interaction summary and the corresponding diagram source code.

Use Cases

Visualizing a complex authentication flow trace to identify a 401 Unauthorized error source.
Generating up-to-date sequence diagrams for technical documentation directly from staging environment logs.
Mapping database query latency across different backend services to find slow API endpoints.

Examples

1. Visualizing a Microservice Login Trace

Backend Developer
Background
A developer is investigating a failed login request that spans an API gateway, an auth service, and a user database.
Problem
Reading raw text logs makes it difficult to see the exact sequence of events and where the failure occurred.
How to Use
Paste the arrow-style trace logs into the Log Input, select 'Mermaid', and enable 'Highlight Errors'.
Example Config
Diagram Format: Mermaid, Include Latency Notes: true, Highlight Errors: true
Outcome
A Mermaid sequence diagram is generated, clearly showing the API calling the auth service, the database query, and a highlighted 401 error note on the auth step.

2. Generating PlantUML from JSON Lines

Site Reliability Engineer
Background
An SRE has exported a batch of structured JSON logs from a monitoring tool showing a slow checkout process.
Problem
Needs to quickly visualize the service hops and latency to identify the bottleneck.
How to Use
Upload the .jsonl log file, select 'PlantUML' as the format, and ensure 'Include Latency Notes' is checked.
Example Config
Diagram Format: PlantUML, Include Latency Notes: true, Max Steps: 20
Outcome
A PlantUML diagram is produced with latency markers (e.g., 82ms, 14ms) attached to each service interaction, revealing the slow database call.

Try with Samples

json, text, file

Related Hubs

FAQ

What log formats are supported?

The tool supports JSON lines with source/target fields, arrow-style logs (e.g., api -> auth), and trace-style text logs.

Can I limit the size of the generated diagram?

Yes, you can set a 'Max Steps' limit (between 3 and 40) to compress the output and ensure the sequence diagram remains readable.

How are errors displayed in the diagram?

If you enable 'Highlight Errors', the tool annotates failing steps with specific error notes directly on the sequence diagram.

Does it support PlantUML?

Yes, you can choose between Mermaid and PlantUML as your output diagram format.

Can I upload a log file instead of pasting text?

Yes, you can upload .log, .txt, .json, or .jsonl files up to 20MB.

API Documentation

Request Endpoint

POST /en/api/tools/log-sequence-diagram-converter

Request Parameters

Parameter Name Type Required Description
logInput textarea No -
logFile file (Upload required) No -
diagramFormat select No -
includeLatencyNotes checkbox No -
highlightErrors checkbox No -
maxSteps number No -

File type parameters need to be uploaded first via POST /upload/log-sequence-diagram-converter to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "result": "Processed text content",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}
Text: Text

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-log-sequence-diagram-converter": {
      "name": "log-sequence-diagram-converter",
      "description": "Convert structured service logs into Mermaid or PlantUML sequence diagrams, with optional latency and error annotations",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=log-sequence-diagram-converter",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]