Operational

DocsGithub Open app

Operational

Github Articles Pitch Usecases Playground API

Contents

Start here
Setup
Get started Send your first event Structured Events Actions Contexts Log limits and errors
Events API
API
Error handling Event parametersPOST Log event Sending actions in events
The Manual
Introduction PWA & push notifications Conventions Setup Manage projects and teammates Categories and search View events in your project Setup PWA on phone Test mode Notifications
Integrations
Nodejs SDK PHP SDK Wordpress plugin
Self hosting
Introduction Install locally Install on VPS Install on Render Install via Docker Install via Docker and Coolify Onboarding Setup .env Setup PWA & push notifications Best practices Durability testing
Other
Vision Roadmap Contributing

Contexts

Contexts help you connect related events. This is great for jobs, workflows, and multi-step tasks.

How it works:

  1. First event: set contextId and contextStart: true.
  2. Follow-up events: use the same contextId.
await ops.events.log({
  name: "daily billing sync started",
  avatar: "🧾",
  contextId: "billing_sync_2026_02_28",
  contextStart: true,
});

await ops.events.log({
  name: "processed invoices",
  contextId: "billing_sync_2026_02_28",
  content: "198 invoices processed",
});

await ops.events.log({
  name: "daily billing sync finished",
  contextId: "billing_sync_2026_02_28",
  type: "rows",
  content: [
    { label: "Succeeded", content: 194 },
    { label: "Failed", content: 4 },
  ],
});

Tip: make contextId easy to predict, like job_1234 or signup_user_55.

Choose a stable contextId

contextId is the chain key. Every follow-up event with the same id joins the same context thread.

Good patterns:

  1. billing_sync_<date>
  2. signup_<userId>
  3. deployment_<releaseId>

Avoid random values for each log call, otherwise events will not chain together.

Another realistic context flow

await ops.events.log({
  name: "import started",
  avatar: "🤖",
  contextId: "import_9834",
  contextStart: true
});

await ops.events.log({
  name: "validated records",
  contextId: "import_9834",
  content: "2,101 records validated"
});

await ops.events.log({
  name: "import finished",
  contextId: "import_9834",
  type: "rows",
  content: [
    { label: "Inserted", content: 2073 },
    { label: "Rejected", content: 28 }
  ]
});
ActionsLog limits and errors

Operational

PrivacyTerms
About the product
  • Use cases
  • Playground
  • API
  • Pitch
  • Pricing
  • Wordpress plugin
Related to the product
  • Open Source
  • Articles
  • VS Logsnag
Useful articles for your SaaS
  • My experience running a Commercial OSS project
  • Force post: The Payment Hack that lets Merchants charge you without approval
  • 6 Best practices for early stage B2B SaaS customer support
  • Setup event notifications for your SaaS