Monitoring
Track workflow health, errors, cost, and AI output quality.
Deployment is the beginning of a workflow's operational life. Connected services change, credentials expire, data quality shifts, traffic grows, and AI behavior can degrade. Monitoring makes these changes visible before silent failures become customer or business incidents.
What Is Monitoring?
Monitoring continuously measures the health, performance, correctness, cost, and business outcomes of automation workflows. It collects signals from executions and dependencies, evaluates them against expectations, and helps people detect, diagnose, and respond to problems.
Monitoring should answer more than whether a workflow process is running. It should reveal whether expected work arrived, whether the right actions occurred once, whether outputs remained useful, and whether the workflow continues delivering its intended outcome.
Observability: Logs, Metrics, and Traces
| Signal | What It Captures | Example Question |
|---|---|---|
| Logs | Discrete events with context | Why did order ord_1042 fail? |
| Metrics | Numeric measurements over time | Is workflow success rate decreasing? |
| Traces | The path of one request across steps and services | Which API call caused the delay? |
| Audit events | Who or what changed important state | Who approved and executed the refund? |
| Quality samples | Reviewed examples of workflow output | Are AI summaries still accurate and useful? |
Monitoring reports known conditions; observability provides enough context to investigate conditions the team did not anticipate. Reliable automation benefits from both.
A Monitoring Loop
| Stage | Purpose | Example |
|---|---|---|
| Observe | Collect workflow and dependency signals | Record run status, duration, input count, and API result |
| Evaluate | Compare signals with expected behavior | Detect a falling completion rate |
| Alert | Notify an accountable responder | Page the owner for a customer-impacting outage |
| Respond | Contain and recover | Pause sending, retry safe work, or use fallback |
| Learn | Prevent recurrence | Fix the cause and add a regression test or monitor |
Workflow run
-> Emit structured logs, metrics, and trace context
-> Evaluate health, quality, and business checks
-> Alert only when action is required
-> Follow runbook and contain impact
-> Recover or replay safely
-> Review cause and improve controlsWorkflow Health Metrics
| Metric | Meaning |
|---|---|
| Trigger count | Events or scheduled runs received |
| Success rate | Runs completing the intended workflow |
| Failure rate | Runs ending in an error |
| Skip rate | Inputs deliberately not processed |
| Retry rate | Runs requiring another attempt |
| Duplicate rate | Repeated events or suppressed duplicate actions |
| Latency | Time from trigger to useful completion |
| Queue depth | Work waiting to be processed |
| Oldest work age | How long the longest item has waited |
| Manual review backlog | Cases awaiting a person |
Always define the denominator. A 99% success rate can mean 99 successful runs out of 100 triggers, or 99 successful steps within one incomplete workflow. The business interpretation differs.
Business Outcome Monitoring
Technical success does not guarantee business success. A workflow may complete every run while routing leads to the wrong team, sending empty reports, or creating duplicate invoices. Monitor the intended process outcome and guardrails.
| Workflow | Outcome Metrics | Guardrails |
|---|---|---|
| Lead routing | Assignment and response time | Wrong-owner and duplicate-contact rate |
| Invoice processing | Cycle time and straight-through completion | Duplicate, exception, and correction rate |
| Support triage | Resolution and first-response time | Misroute, escalation, and reopen rate |
| AI email drafting | Accepted drafts and time saved | Factual corrections, complaints, and inappropriate sends |
| Scheduled reports | Reports delivered with complete data | Late, stale, missing, or duplicated reports |
Structured Logging
Structured logs use predictable fields rather than only free-form text. This makes it easier to search, aggregate, correlate, and alert across workflow runs.
{
"timestamp": "2026-07-20T10:15:22Z",
"level": "error",
"workflow": "invoice-processing",
"workflow_version": "3.4.1",
"run_id": "run_8f31",
"trace_id": "trace_2aa7",
"step": "create-payable",
"source_record_id": "inv_1042",
"error_category": "permission_denied",
"retryable": false,
"duration_ms": 842
}- Use stable workflow, run, trace, event, and business-record identifiers.
- Record step name, version, status, duration, attempt number, and error category.
- Log decisions and state transitions for important operations.
- Keep messages concise and put searchable values in named fields.
- Do not log credentials, authorization headers, full prompts, or unnecessary personal and confidential data.
Correlation and Distributed Tracing
One business event may pass through a webhook, queue, workflow platform, AI service, CRM, and messaging provider. Propagate a correlation or trace ID across these boundaries so the complete journey can be reconstructed without relying on timestamps alone.
trace_2aa7
Webhook received
-> Queue message published
-> AI classification completed
-> CRM record updated
-> Slack notification posted
-> Workflow completedDependency Monitoring
- Track external API availability, latency, status codes, quotas, and rate limits.
- Monitor credential expiry, permission changes, webhook delivery, and connector authorization.
- Detect schema changes and missing fields in upstream data.
- Measure queue, database, storage, model, and notification-provider health.
- Use synthetic checks for critical endpoints when waiting for real traffic would delay detection.
- Distinguish a dependency outage from a workflow-code or business-data failure.
Error Classification
| Category | Example | Response |
|---|---|---|
| Invalid input | Required customer ID is missing | Reject or route for correction |
| Authentication | OAuth token expired | Pause affected work and renew securely |
| Authorization | Integration lost database access | Alert owner; do not retry unchanged |
| Rate limit | Provider returns a throttling response | Delay according to provider guidance |
| Temporary dependency | Service unavailable | Retry with bounded increasing delays |
| Business rule | Invoice exceeds approval authority | Route to authorized reviewer |
| AI quality | Output is malformed or unsupported | Reject, retry safely, or request review |
| Unknown | Unexpected exception | Preserve context, stop safely, and investigate |
Alert Design
An alert should represent a condition that requires timely human action. It should identify impact, severity, affected workflow, start time, current evidence, owner, source links, and the first recommended runbook step.
- Alert on symptoms and business impact, not every individual error.
- Group related failures and suppress duplicate notifications.
- Use warning, ticket, and page levels according to urgency.
- Route alerts to a named team with an escalation path.
- Include a recovery notification when the condition clears.
- Review alerts that are ignored, unactionable, or repeatedly noisy.
[HIGH] Invoice workflow backlog
Impact: 184 invoices delayed; oldest waiting 47 minutes
Started: 10:05 UTC
Likely area: accounting API authorization failures
Owner: Finance Automation On-call
Dashboard: <approved monitoring link>
Runbook: Pause new processing, verify credential status, then reconcile queued eventsStatic Thresholds and Anomaly Detection
Static thresholds are transparent and useful for known limits, such as any payment failure or a queue older than fifteen minutes. Baseline or anomaly detection can identify unusual changes when normal behavior varies by hour, weekday, or season.
Anomaly detection is a signal, not a diagnosis. Evaluate false positives, seasonality, deployments, business events, and data gaps. Keep critical safety and policy controls deterministic rather than relying only on anomaly models.
Monitoring AI Workflow Quality
| Dimension | Example Measure |
|---|---|
| Validity | Structured-output and schema pass rate |
| Accuracy | Correct classification, extraction, or answer rate on reviewed samples |
| Groundedness | Claims supported by supplied sources |
| Safety | Policy violation and sensitive-data exposure rate |
| Usefulness | Human acceptance, edit, and override rate |
| Fairness | Performance differences across relevant groups or contexts |
| Latency | Model and end-to-end response time |
| Cost | Tokens, requests, and cost per successful business outcome |
| Fallback | Low-confidence, refusal, escalation, and manual-review rate |
Model confidence is not the same as correctness and may not be calibrated. Compare outputs with reviewed examples, deterministic validation, source evidence, and downstream outcomes.
Evaluation Sets and Sampling
- Maintain a versioned evaluation set with common, difficult, and high-risk cases.
- Run evaluations before changing models, prompts, tools, retrieval, or workflow logic.
- Sample live outputs using a documented and privacy-conscious method.
- Include errors, low-confidence cases, overrides, complaints, and randomly selected successes.
- Use clear reviewer rubrics and measure agreement when judgments are subjective.
- Feed confirmed production failures back into tests without exposing unnecessary sensitive data.
Drift
| Drift Type | Example |
|---|---|
| Input drift | Customer requests use new topics or languages |
| Data-quality drift | A source field becomes frequently empty |
| Concept drift | The meaning of a high-priority case changes |
| Knowledge drift | Policies or product facts become outdated |
| Model or prompt drift | A provider or workflow version changes output behavior |
| Outcome drift | Routing accuracy or customer satisfaction declines |
Monitor input distributions, validation failures, output categories, human corrections, and business results together. A technically valid response can still be wrong because the world or policy changed.
Cost Monitoring
- Track workflow-platform executions, API requests, model tokens, storage, queues, and notification costs.
- Attribute cost by workflow, customer or department where appropriate, model, and outcome.
- Alert on unusual volume, retry storms, unexpectedly large prompts, and sudden model-cost changes.
- Measure cost per successfully processed record or business outcome, not only cost per request.
- Set budgets and controlled degradation paths before limits are reached.
Dashboards
A useful dashboard is designed for a specific audience. Operators need current health, failures, backlog, and dependencies; business owners need volumes, cycle times, outcomes, and exceptions; AI owners need evaluation, safety, drift, latency, and cost.
- Show service objectives and current status before detailed charts.
- Use consistent time ranges, units, definitions, and filters.
- Link from aggregate metrics to the relevant run, trace, or review queue.
- Mark deployments, configuration changes, outages, and data gaps.
- Avoid exposing personal data or confidential payloads on broadly visible dashboards.
Service Objectives
Define targets based on user and business needs, such as 99.5% of eligible support tickets correctly routed within two minutes over a rolling month. Track both reliability and correctness; a fast wrong answer is not a successful service.
| Concept | Meaning |
|---|---|
| Indicator | A measured behavior such as completion latency or correct-routing rate |
| Objective | The target for an indicator over a defined period |
| Error budget | The tolerated amount of performance below perfect service |
| Burn rate | How quickly the workflow consumes that tolerance |
Incident Response
Detect
-> Confirm impact and severity
-> Assign incident owner
-> Contain: pause, disable, limit, or use fallback
-> Preserve evidence and communicate status
-> Recover and reconcile missed or partial work
-> Verify customer and data state
-> Review root causes and improve the systemRecovery is not complete when the workflow starts running again. Reconcile queued, skipped, duplicated, or partially processed business records and communicate corrections when necessary.
Runbooks
- Describe the alert, likely impact, and owning team.
- Link dashboards, logs, traces, dependencies, and recent changes.
- Provide safe diagnostic and containment steps.
- Explain retry, replay, reconciliation, rollback, and escalation procedures.
- Identify actions that require approval or should never be performed during an incident.
- Test and update runbooks through exercises and real incidents.
Monitoring Data Security
- Redact credentials, tokens, secrets, authorization headers, and sensitive payload fields before collection.
- Apply least-privilege access to logs, traces, dashboards, and review samples.
- Encrypt monitoring data in transit and at rest according to organizational requirements.
- Define retention and deletion periods rather than storing detailed events indefinitely.
- Audit access to sensitive monitoring systems and exports.
- Treat user prompts, model responses, attachments, and tool parameters as potentially sensitive.
Synthetic and End-to-End Checks
Component health does not prove that a complete workflow works. A safe synthetic transaction can periodically follow the critical path with test data and a non-production destination, verifying trigger receipt, processing, external updates, and notifications without affecting real customers.
Best Practices
- Define expected technical and business behavior before launch.
- Instrument every important step with structured, correlated signals.
- Monitor absence, delay, duplication, quality, and outcomes—not only explicit errors.
- Make alerts actionable, impact-based, owned, deduplicated, and linked to runbooks.
- Evaluate AI with reviewed samples, versioned test sets, guardrails, and drift signals.
- Track cost and reliability per successful business outcome.
- Protect monitoring data through redaction, least privilege, and retention controls.
- Test alerts, fallbacks, replay, reconciliation, and incident procedures regularly.