A browser-only tool for tracing banking API call flows through Splunk logs: Mobile App → eComm → Enterprise → MS (MicroService) → EAI/Host. It generates a parameterised SPL query, runs the same logic over your log files or a Splunk Excel/CSV export in the browser, and shows the flow table, PlantUML and SVG sequence diagrams, and the processing rules it observes. Nothing is uploaded.
Live demo: https://zhangranarz.github.io/TraceZLine/ · API Analysis with mock data
Two main tabs: Session Trace (with its own tabs Query, Flow Analysis, API Analysis and Data Masking) and API Trace.
| Tab | What it does |
|---|---|
| Session Trace › Query | Generates the SPL query from editable sources (or a Source table: an Excel/CSV of Country, Module and one source= path per layer; choosing a Country and Module sets each source's path; N/A leaves that source out of the search), Search terms (1) session IDs, or 2) the last session of an eComm API or 3) of an Enterprise API, such as /application/confirm: a Session query finds the newest event of that layer with that text; Run in Splunk runs it first and its sessionId becomes the search term of the Flow and Log queries, which are not run when it finds none), an optional Start/End time, layers and rex rules; copy or download it, or Run in Splunk. A second Log query returns the raw events (EventTime, _raw) of the same sources and search terms, sorted by time. Run in Splunk logs in and runs both: the flow query's CSV opens in Flow Analysis, the log query's raw log is masked with the Mask rules, then API Analysis maps the CSV lines to the masked log. Include API Analysis (off by default) adds the log query, masking and mapping; off, only the flow query runs |
| Session Trace › Flow Analysis | Runs the query logic over your raw logs (Local File) or a Splunk .xlsx/.csv export (Upload) |
| Session Trace › API Analysis | Maps each line of a Splunk result to its raw log event by timestamp, with the JSON/XML payload as a Parameter / Value table and a data-quality report |
| Session Trace › Data Masking | Masks sensitive values in log/text files by JSON key, XML tag, exact text or Pre/Post text (replace with <<MASK_NAME>> or your own text, digits to *, keep last 4, or consistent pseudonyms), flags what still looks sensitive, and downloads the masked files |
| API Trace | For one Module of the Source table, the last session of an eComm or Enterprise API (e.g. application/submission) in each chosen Country: one Splunk search over those countries' sources of that layer (its Source table column), newest event per Country, its own Run in Splunk panel (Mode, URL, user, time range and certificate shared with Session Trace › Query), output Country / EventTime / sessionId / Endpoint (copy, CSV, or send a session to Search terms); countries with no match are listed |
Views in Flow Analysis: Flow (session summary and flow table), PlantUML, Sequence (SVG diagram: one for all sessions or one per session, with optional notes and elapsed times), Processing Rule (each API with a description of the call: callers, downstream calls, SvcCodes, gaps, latency) and Debug.
Everything runs in the browser; settings are saved there too. Demo links: #compare,
#mask (both with the bundled mock data).
git clone https://github.com/zhangranarz/TraceZLine.git
cd TraceZLineThere is nothing to install: the page is plain HTML, CSS and JavaScript with no dependencies and no build step.
- Node.js ≥ 18 is needed only for the tests and the command-line tools.
- Python 3 is needed only for the local web server.
-
Online: open https://zhangranarz.github.io/TraceZLine/.
-
Locally:
python tools/serve.py 8765
then open http://localhost:8765/ (or http://localhost:8765/#compare for the demo). Use the server rather than opening
index.htmlas a file: the Use Mock buttons loadmock/*.logover HTTP.
Command-line tools:
npm test # unit and end-to-end tests
node tools/simulate.js --all mock/*.log # run the query logic over log files
node tools/simulate.js --config tracezline-config.json --terms <sessionId> my.log
npm run mock # regenerate the mock logs
npm run security-scan # pre-push scan (also run in CI)- Files you load are read in your browser and never uploaded. The page loads nothing from other sites; the only outbound request is the optional PlantUML Render, which asks before sending the diagram text to plantuml.com.
- Run in Splunk goes only to the Splunk URL you enter, through the local server
(
python tools/serve.py), because neither Splunk's REST API (port 8089) nor Splunk Web (e.g. port 8000, Splunk Web mode) answers a web page directly. Splunk Web's session cookies stay in the local server's answers, not in your browser. The password is sent once, to log in, and is not saved; the URL and username are kept in your browser. It is not available on GitHub Pages. - Use the Data Masking tab before sharing a log. Its consistent mode keeps sessions linkable through a key-based HMAC; the key stays in your browser.
- Never commit real or undesensitised logs.
ToolBase/,*.logand*.xlsxare git-ignored (only the fake files inmock/are tracked). npm run security-scanblocks a push when it finds data files, secrets, values copied from your local (untracked or ignored) data files, or off-site network use by the page.
| Path | Contents |
|---|---|
index.html, css/ |
The page |
js/spl.js |
SPL generator and settings validation |
js/flow.js |
Query logic over log text, session summary, sequence model, PlantUML |
js/sequence.js |
SVG sequence diagram renderer |
js/importer.js |
Excel (.xlsx) and CSV reader for Splunk flow exports |
js/rules.js |
Processing-rule analysis and Markdown export |
js/compare.js |
Timestamp mapping of a Splunk result to the raw logs, data-quality checks |
js/splunk.js |
Run in Splunk: login, search job, results as CSV (through tools/serve.py) |
js/mask.js |
Masking rules (JSON key, XML tag, exact text, Pre/Post) and the leftover scan |
js/app.js |
Page wiring |
mock/ |
Fake logs, flow exports and expected output (details) |
tests/ |
node --test suites |
tools/ |
serve.py (also forwards Run in Splunk), simulate.js, security-scan.js |
.github/workflows/ |
CI and GitHub Pages deployment |
.claude/commands/publish.md |
/publish command for Claude Code |