Guides / Monitoring

How to Use Channels to Organize Your Events

3 min read·Monitoring

What Channels Are

A channel is a named stream of events — like a topic in a message queue. You create one implicitly the first time you call logit.now("channel-name", ...). There's no upfront configuration.

The Wrong Way: One Channel for Everything

ts
// ❌ Don't do this
await logit.now("events", { event: "User signed up", ... });
await logit.now("events", { event: "Payment failed", ... });
await logit.now("events", { event: "Cron job ran", ... });

Everything ends up in one stream. You can't filter. You can't set Smart Actions rules that target "only payment failures." You lose granularity.

The Right Way: One Channel Per Domain

ts
// ✅ Domain-specific channels
await logit.now("signups", { event: "New user signed up", ... });
await logit.now("payments", { event: "Payment failed", ... });
await logit.now("cron", { event: "Daily report job ran", ... });
await logit.now("errors", { event: "Application error", ... });
await logit.now("security", { event: "Auth failure", ... });
ChannelEvents
signupsNew user, verification email sent, email confirmed
paymentsPayment succeeded, failed, refunded
subscriptionsTrial started, converted, cancelled, upgraded
errorsApplication errors, uncaught exceptions
cronScheduled job start, success, failure
securityAuth failures, password resets, suspicious activity
emailsTransactional emails sent, bounced, opened
jobsBackground job queued, completed, failed

Why This Matters for Smart Actions

Smart Actions rules target a specific channel. If all your events are in one channel, you can't write a rule that fires only on payment failures. Domain separation makes rules precise.

Tips

  • Name channels in lowercase, with hyphens for multi-word names: payment-links, trial-signups.
  • Don't create a new channel for every variation — use tags to distinguish within a channel (e.g. tags: { plan: "pro" }).
  • You can rename a channel by starting to log to a new name — old events remain in the old channel.

Try LogIt free

7-day trial. No credit card required.

Start free