New to Kestra?
Use blueprints to kickstart your first workflows.
Orchestrate automated synthetic latency probes for FastAPI services with p95 percentile evaluation and Slack incident alerting in Kestra.
Production microservices built with modern asynchronous Python frameworks (such as FastAPI) require strict Service Level Objective (SLO) guarantees for user-facing API routes. Slow queries, connection pool saturation, or garbage collection pauses can cause sudden tail-latency spikes that bypass simple uptime monitors.
This blueprint automates continuous synthetic probing against critical FastAPI endpoints. It measures multi-sample latency profiles, calculates p95 percentile response times, evaluates results against defined SLA/SLO thresholds, and dispatches rich triage alerts to your designated Slack operational incident channel.
run_synthetic_probes (io.kestra.plugin.scripts.python.Script): Launches an isolated Python container to execute calibrated synthetic HTTP probe requests, measuring per-request duration and calculating the p95 percentile latency metric before emitting structured parameters via Kestra.outputs.evaluate_slo_compliance (io.kestra.plugin.core.flow.If): Tests whether calculated p95 latency breaches the configured latency budget threshold. Routes to notify_slo_breach on violation, or notify_slo_healthy for routine operational confirmation.log_slo_metrics_archive (io.kestra.plugin.scripts.shell.Commands): Logs and archives metric audit metadata for compliance tracking.alert_on_probe_failure (errors block): Triggers immediately if target endpoints drop packets, time out, or encounter runner failures, notifying on-call engineers with the execution ID.*/15 * * * *).Monitoring latency SLAs across multiple distributed endpoints requires resilient scheduling, isolated container runtimes, and customizable alerting workflows. Kestra coordinates synthetic checks declaratively without provisioning extra daemon infrastructure, providing native secrets handling and built-in execution histories for trend analysis.
SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint for alerting.SLACK_WEBHOOK_URL secret in your Kestra namespace.api_endpoint_url and p95_latency_threshold_ms inputs according to your service specifications.recurring_slo_check cron trigger enabled for automated continuous health surveillance.io.kestra.plugin.notifications.pagerduty.PagerDutyAlert) for Sev-1 escalations when p95 breaches persist.