Skip to main content

How alerts reach you

Pylva can deliver alerts through webhook, email, and Slack channels. Builders configure webhook destinations in the dashboard, attach alert channels to rules, verify signed webhook payloads with the SDK helper, and monitor failed deliveries through the dead-letter queue. Rule events are the history of what happened. Alerts are notifications delivered to your configured channels.

What can trigger an alert

Alerts can come from:
  • Rules and controls.
  • Anomalies and margin risk.
  • Instrumentation health checks.
  • Backup model price changes.
  • Billing and payment events.
Email and Slack are useful for humans; webhooks are useful for systems that need to route, page, or automate follow-up.

Webhook setup

Webhook configs define:
  • Destination URL.
  • Event types to deliver.
  • Enabled or disabled state.
  • Signing secret.
Webhook secrets are shown once. Save them in your receiver’s secret store. Rule alert channels attach webhook, email, or Slack delivery to a specific rule. A webhook config by itself does not mean every rule will notify that destination.

Verify webhook requests

Webhook delivery uses signed requests. Verify the raw body with X-Pylva-Signature, X-Pylva-Timestamp, and the signing secret shown when the webhook is created or rotated.

TypeScript

import { verifyWebhook } from "@pylva/sdk";

const ok = verifyWebhook(
  rawBody,
  signatureHeader,
  process.env.PYLVA_WEBHOOK_SECRET!,
  timestampHeader,
);

Python

from pylva import verify_webhook

ok = verify_webhook(
    raw_body,
    signature_header,
    webhook_secret,
    timestamp_header,
)
Reject the request if verification fails. Use the raw request body, not a parsed and re-serialized JSON object.

Retries and DLQ

Pylva retries transient delivery failures. If delivery still fails, the alert is held in the dead-letter queue for review. Use the DLQ to inspect failed deliveries, fix the receiver or channel configuration, and retry. Owners can retry DLQ entries. Handled or no-longer-needed entries can be dismissed.

Practical checklist

  • Create webhook configs before attaching webhook channels to rules.
  • Store webhook signing secrets immediately.
  • Verify signatures in the receiver before acting on an alert.
  • Use email or Slack for human review.
  • Use webhooks for routing, paging, and automation.
  • Review the DLQ when expected alerts do not arrive.