Alert destinations
Every place Monitor can send alerts and metrics, with a config example for each: Slack, Discord, Teams, PagerDuty, Opsgenie, Sentry, Datadog, Better Stack, Checkly, OTLP and a signed webhook.
Monitor sends alerts and metrics to the tools you already use. Configure destinations (called sinks) in code:
import { notifierFromConfig, recordMetric, METRIC } from "@shipyard/monitor";
const notify = notifierFromConfig({
sinks: [{ type: "slack", url: process.env.SLACK_URL }, { type: "pagerduty", routingKey: "..." }],
});
await recordMetric(notify, METRIC.up, 1, { target: "acme-orders" });
Every setting falls back to an environment variable, so { type: "slack" } works when the variable is set. notifierFromEnv() builds every sink whose variables are present. A sink that throws does not affect the others. Network errors, 408, 429 and 5xx are retried (500 ms, then 1 s). Logs name the sink only, never URLs or keys.
An alert key decides its type: <target>:down:<id> opens an incident, <target>:recovered:<id> closes it, and tool, eval, tool-call and presence keys are regressions. Set linkBase (or SHIPYARD_LINK_BASE) on a sink to add an "Open in Shipyard" link. Possible rug pulls arrive as critical or warn regressions.
Metrics: mcp.handshake.latency, mcp.tools.count, mcp.eval.pass_rate and mcp.up, tagged by target. Sinks that take metrics: Datadog, OTLP, signed webhook, Sentry and the two heartbeats (mcp.up only).
Slack
Incoming webhook, Block Kit message. Env: SHIPYARD_SLACK_WEBHOOK_URL.
{ type: "slack", url: "https://hooks.slack.com/services/T/B/X", linkBase: "https://app.example.com/targets" }
Discord
Webhook with one embed. Env: SHIPYARD_DISCORD_WEBHOOK_URL.
{ type: "discord", url: "https://discord.com/api/webhooks/ID/TOKEN" }
Microsoft Teams
Workflows webhook ("When a Teams webhook request is received"), Adaptive Card 1.4. Env: SHIPYARD_TEAMS_WEBHOOK_URL.
{ type: "teams", url: "https://prod-00.westus.logic.azure.com/workflows/..." }
PagerDuty
Events API v2. An incident opening triggers with dedup_key = <target>:incident:<id> and its close resolves it. Regressions trigger on their own key. Env: SHIPYARD_PAGERDUTY_ROUTING_KEY.
{ type: "pagerduty", routingKey: "R0UT1NGKEY", source: "mcpshipyard" }
Opsgenie
Alert API. Create with alias = <target>:incident:<id>, close by alias. Env: SHIPYARD_OPSGENIE_API_KEY, SHIPYARD_OPSGENIE_REGION (eu for the EU host).
{ type: "opsgenie", apiKey: "...", region: "us" }
Sentry
DSN only. Uses Crons check-ins, one monitor per target (mcp-<target>): mcp.up 1 and incident close send ok, mcp.up 0 and incident open send error. The first check-in creates the monitor. Regressions become events through the envelope endpoint; events is "regressions", "all" or "none". Env: SHIPYARD_SENTRY_DSN or SENTRY_DSN, SENTRY_ENVIRONMENT.
{ type: "sentry", dsn: "https://PUBLICKEY@o123.ingest.sentry.io/456", environment: "production", intervalMinutes: 5 }
Datadog
Gauges go to the v2 series API and alerts to the v2 events API. If alert events are rejected with 403, set appKey too. Env: DD_API_KEY, DD_APP_KEY, DD_SITE (default datadoghq.com).
{ type: "datadog", apiKey: "...", site: "datadoghq.eu", tags: ["env:prod"] }
Better Stack
Heartbeat URL. A healthy handshake pings it, and a failed handshake or an incident opening hits <url>/fail. Env: SHIPYARD_BETTERSTACK_HEARTBEAT_URL. Use urls for one heartbeat per target.
{ type: "betterstack", urls: { acme-orders: "https://uptime.betterstack.com/api/v1/heartbeat/TOKEN" } }
Checkly
Heartbeat check ping. Only healthy handshakes ping, because Checkly alerts when pings stop. Env: SHIPYARD_CHECKLY_HEARTBEAT_URL.
{ type: "checkly", url: "https://ping.checklyhq.com/HEARTBEAT-UUID" }
OTLP/HTTP JSON
For Grafana, Honeycomb and New Relic. Gauges are posted to <endpoint>/v1/metrics. Metrics only. Env: OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS (k=v,k2=v2), OTEL_SERVICE_NAME.
{ type: "otlp", endpoint: "https://api.honeycomb.io", headers: { "x-honeycomb-team": "KEY" } }
Signed webhook
JSON POST for anything else. Headers: x-shipyard-timestamp (unix seconds) and x-shipyard-signature: sha256=<hex>, an HMAC-SHA256 over <timestamp>.<raw body>. Alert body: {event:"alert",kind,severity,title,body,target,server,incident_id,dedup_key,link,at}. Metric body: {event:"metric",name,value,tags,at}. Env: SHIPYARD_SIGNED_WEBHOOK_URL, SHIPYARD_SIGNED_WEBHOOK_SECRET.
{ type: "webhook", url: "https://example.com/hook", secret: "..." }
Verify on receipt with verifySignature(secret, timestamp, rawBody, signature), which allows a 5-minute window.
Verification status
The PagerDuty, Opsgenie, Datadog, Sentry and Checkly formats were checked against vendor docs on 2026-12-03. OTLP path and encoding were checked, attribute and gauge shapes come from the OTLP proto. Slack, Discord, Teams, Better Stack and the signed webhook were not checked in that pass. None were tested against live accounts, so send a test alert before relying on one.
Related: monitoring.