OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Workflow Monitoring
Production workflows need robust observability. ContractSpec provides SLA monitoring, distributed tracing, and audit logging out of the box.
SLA Monitoring
Use the SLAMonitor to detect when workflows or individual steps exceed their budgeted duration.
import { SLAMonitor } from '@contractspec/lib.contracts-spec/workflow/sla-monitor';
const monitor = new SLAMonitor((event, payload) => {
if (event === 'workflow.sla_breach') {
console.error('SLA Breach!', payload);
// Send to PagerDuty / Slack
}
});
// Check periodically
monitor.check(currentState, workflowSpec);Telemetry & Tracing
Workflows automatically generate OpenTelemetry spans for:
- Overall workflow execution
- Individual steps
- Retries and compensation
Configure your OpenTelemetry exporter to send traces to Jaeger, Datadog, or Honeycomb.
Dashboarding
You can build a custom dashboard using DataViews over your workflow state database. See the DataViews tutorial for how to visualize WorkflowState records.
Telemetry
Instrument surfaces, collect evidence, and keep observability aligned with the contract model.
Distributed tracing
Trace contract execution across integrations, workflows, and generated surfaces.
Why ContractSpec
Keep educational and comparison content reachable without letting it define the primary OSS learning path.