Python Latency SLA Report
Normalise messy API timestamps with python-dateutil, then compute p50/p95/p99 latency and SLA breach rate in a sandboxed Code node.
The full canvas, before you import it
Click any node to see its config.
Click a node to select it — same as the Heym editor; the panel shows its settings.
4 nodes · Free & source-available
Python Latency SLA Report
Turn a raw list of API events into a latency report with percentiles and an SLA breach rate. Both steps run in the Code node, so the logic is plain Python and the run is deterministic — no LLM in the loop.
What this workflow does
- rawEvents holds a JSON array of API calls whose timestamps arrive in four different formats
- normalizeEvents installs
python-dateutiland parses every timestamp into sorted UTC ISO strings - latencyStats uses the standard library
statisticsmodule for p50, p95, p99, mean, and standard deviation, and counts SLA breaches against a millisecond budget - slaReport returns the normalised events alongside the report
Why the Code node
This is the case the Code node exists for. Percentiles and standard deviation cannot be expressed in a Set node, and mixed timestamp formats (14/08/2026 09:15, Aug 14 2026 9:19am, 2026-08-14T09:12:04Z) need a real date parser rather than a format string. Sending the rows to an LLM would be slower, cost money, and give a different answer on each run.
Each execution creates a throwaway container, installs python-dateutil into it, runs the code, and destroys it. The second node leaves requirements.txt empty, which skips installation entirely and makes it noticeably faster.
Note on network
Both Code nodes keep Allow network off, so the code itself has no egress at all. Dependency installation still reaches PyPI — that phase always has network. If you extend this to pull events from a live endpoint, use an HTTP node and pass the body in through Parameters rather than enabling network on the Code node.
Use cases
- Weekly latency review for an API or a background worker
- SLA breach reporting against a millisecond budget
- Any numeric summary that Set cannot express: percentiles, deviation, weighted scoring
How to import this template
- 1Click Import → Copy JSON on this page.
- 2Open your Heym and navigate to a workflow canvas.
- 3PressCmd+V/Ctrl+V— nodes appear instantly.
- 4Add your API keys in the node config panels and click Run.
Discover more automations
- Dev & IT OpsWorkflow Change Audit LogCapture every workflow create, update, and delete on your Heym instance and post a batched summary to Slack.
- Dev & IT OpsCodex PR Fix AgentSend a coding task to Codex, open a draft PR when it succeeds, and notify Slack when Codex needs follow-up input.
- Dev & IT OpsOpenCode Go PR Fix AgentSend a coding task to OpenCode Go, open a review-ready pull request, and return the implementation result.
- Dev & IT OpsAgent-Guided Codex PR DispatcherLet an Agent inspect a GitHub request, prepare a confirmed Codex task, open a ready PR, and notify Slack when Codex needs input.
- Dev & IT OpsCursor Post NotifierMonitor the Cursor blog on a schedule and Slack-notify your team when a new post goes live.
- Dev & IT OpsClaude Blog MonitorMonitor the Anthropic blog on a schedule and Slack-notify your team on new Claude posts.
- Dev & IT OpsGitHub Release RadarCompare the latest GitHub release tag against Redis and notify Slack when a project ships a new version.
- Dev & IT Opsweb.dev Article MonitorCron + crawler + Redis dedupe + Slack: get notified when Google's web.dev blog publishes a new article.
- Dev & IT OpsCloudback MCP Backup Coverage ReviewReview Cloudback backup coverage with a Docker-based MCP server, gate configuration changes with HITL, and notify ops in Slack.
- Dev & IT OpsResilient HTTP + Error HandlerAttach an Error Handler node to an HTTP call and Slack-notify your team the moment a request fails.
- Dev & IT OpsPlaywright Visual AI MonitorTake a full-page screenshot on a schedule, analyse it with an LLM for anomalies, and Slack-alert when something looks off.
- Dev & IT OpsRealtime WebSocket Alert RelayListen to an external WebSocket feed, audit critical events, and forward them to another realtime channel.