Typed boundaries
Validate event envelopes before they leave the producer. Separate workspace identity, event identity and trace context so the same event can be retried safely.
JavaScript / TypeScript / reference version 2.4.0
The fictional PulseFlow SDK models typed event submission, workflow correlation and predictable errors. Explore the API contract here, then use the local playground to inspect synthetic traces without credentials.
Validate event envelopes before they leave the producer. Separate workspace identity, event identity and trace context so the same event can be retried safely.
Batch at most 100 events or 1 MiB and flush every two seconds in the reference design. Telemetry must not block the business request indefinitely.
Handle structured error codes, retry hints and request IDs. Treat missing scopes differently from a temporary upstream timeout.
import { PulseFlow } from '@pulseflow/cloud-sdk';
const client = new PulseFlow({
token: process.env.PULSEFLOW_TOKEN,
workspaceId: 'ws_demo',
region: 'us-east-1',
timeoutMs: 5000
});
await client.events.emit({
id: 'evt_demo_1001',
type: 'workflow.succeeded',
schema_version: '2026-10-01',
occurred_at: new Date().toISOString(),
workspace_id: 'ws_demo',
data: { run_id: 'run_checkout_42', duration_ms: 184 }
}, { idempotencyKey: 'checkout-demo-42' });This is documentation pseudocode for an imagined package. Do not import it into this static site or assume that a similarly named registry package is trusted. The actual simulator below is a dependency-free script shipped in this repository.
Choose a workflow and simulated duration. The result divides that duration across three spans. The error switch changes the returned event state; it does not contact an upstream service or wait for the specified duration.
Ready. Generate a synthetic trace to inspect the local response.
To explore delivery behavior, switch to the webhook simulator. For concepts and region boundaries, return to the architecture guide.