Langfuse v4: up to 165ร— faster ยท Read more
DocsAlerts

Alerts

Where is this feature available?
  • Hobby
    Available
  • Core
    Available
  • Pro
    Available
  • Enterprise
    Available
  • Self Hosted
    Langfuse v4+

On Langfuse Cloud, the number of alerts per organization depends on your plan: 2 (Hobby), 20 (Core), 50 (Pro), and 100 (Enterprise).

Alerts allow you to catch cost and quality issues before they impact your users.

You can receive notifications over Slack, trigger GitHub Actions, or call your own Webhooks.

Alerts list showing severity, name, and tags for each alert

Create an alert

Navigate to Alerts in your project and click New Alert.

Configure the metric

Choose what data the alert measures.

FieldDescription
Data sourceObservations, Scores (numeric), Scores (categorical), or Scores (boolean)
MetricAggregation + measure โ€” e.g. avg latency, count, p95 cost
FiltersNarrow the dataset (model name, tags, user ID, environment, Boolean value, etc.)

For Boolean scores, the average value is the share of scores that are true. Use it to alert on rates such as policy-check passes or detected hallucinations.

Set alert conditions

Choose what range you expect the metric values to fall within.

FieldDescription
Operator>, โ‰ฅ, <, โ‰ค, =, โ‰  โ€” direction of the alert condition
Alert thresholdRequired. Crossing this value sets severity to ALERT.
Warning thresholdOptional. Crossing this value (before the alert threshold) sets severity to WARNING.
WindowHow far back each evaluation looks (e.g. 1 hour, 1 day, 1 week)

Configure advanced settings (optional)

Choose special handling for edge cases when data is missing or when an alert stays in an unresolved state for extended periods of time.

No-data handling โ€” what happens when the query returns no data:

ModeBehavior
Treat missing data as 0 (default)Treat null as 0 and compare against thresholds
Keep the previous severityHold the previous severity; send no notification
Show severity NO_DATARecord NO_DATA severity; send no notification
Notify after sustained NO_DATARecord NO_DATA severity; send a notification after a configurable delay

Renotify โ€” whether to re-notify while severity stays elevated:

ModeBehavior
Off (default)Notifies once on each severity transition
Every N minutesRe-notifies every N minutes while severity persists (1โ€“10,080 min)

Select a notification channel

Select one or more automations from the Automations panel. When an alert fires, Langfuse publishes the event to each selected automation, which dispatches your configured actions (Slack message, webhook, etc.).

See Automations to set up actions before linking them here.

Name and save

Give the alert a descriptive name (max 200 characters) and optional tags, then click Save. The alert becomes ACTIVE immediately and schedules its first evaluation.

Alert states

Each alert carries a severity that updates after every evaluation.

SeverityMeaning
UNKNOWNInitial state โ€” not yet evaluated
OKMetric is within bounds
WARNINGMetric crossed the warning threshold
ALERTMetric crossed the alert threshold
NO_DATAQuery returned no data and no-data mode is Show severity NO_DATA or Notify after sustained NO_DATA
PAUSEDAlert is paused; no evaluations run

When notifications fire:

  • Breach (UNKNOWN | OK โ†’ WARNING | ALERT): always notifies.
  • Recovery (WARNING | ALERT โ†’ OK): always notifies.
  • No data (NO_DATA โ†” WARNING | ALERT | OK | UNKNOWN): only notifies when no-data mode is Notify after sustained NO_DATA.
  • Sustained severity (WARNING โ†’ WARNING, ALERT โ†’ ALERT): notifies only when Renotify is enabled.

Pause and resume

From the alert list or detail page, use the row actions menu to Pause or Resume an alert. A paused alert skips all evaluations; its severity is frozen at PAUSED. Resuming sets it back to ACTIVE and schedules the next evaluation.

Automations

Automations route alert notifications to external systems. Each automation pairs a trigger (an alert severity change) with an action (a notification sent to an external system).

Three notification channels are available:

ActionWhat it does
SlackPosts a formatted alert message to a Slack channel
WebhookHTTP POST to your endpoint with an HMAC-signed JSON payload
GitHub ActionsFires a workflow_dispatch event on a GitHub repository

If you would like to see another channel added, please add to the GitHub discussions.

Create an alert automation

  1. Navigate to Automations and click Create Automation.
  2. Select event source Alert.
  3. Select an action type (Slack, Webhook, or GitHub Actions).
  4. Configure the action: provide a Slack channel, a webhook endpoint URL, or a GitHub repository dispatch URL, event type, and personal access token.
  5. Give the automation a name and click Save. It will appear in the Automations panel when you create or edit alerts.
  1. Create a new alert automation or edit an existing one.
  2. Create a new alert or edit an existing one.
  3. Select the automation from the Automations panel found in the notifications section of the alert editor.
  4. Click Save to link the alert to the selected automations.

An alert fires every linked automation whenever its severity transitions (see Alert states).

After 5 consecutive delivery failures, Langfuse automatically disables the automation's trigger. Re-enable it from the Automations page once the endpoint is restored.

Webhook payload

Your endpoint receives a signed JSON body:

alert-payload.json
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": "2024-07-10T10:30:00Z",
  "type": "monitor-alert",
  "apiVersion": "v1",
  "payload": {
    "monitorId": "monitor_abc123",
    "projectId": "proj_xyz789",
    "permalink": "https://cloud.langfuse.com/project/proj_xyz789/monitors/monitor_abc123",
    "message": {
      "title": "avg latency crossed alert threshold",
      "body": "avg latency is 1234 ms (threshold: 1000 ms) over the last 1 hour"
    },
    "severity": "ALERT",
    "timestamp": "2024-07-10T10:30:00Z",
    "fromTimestamp": "2024-07-10T09:30:00Z",
    "toTimestamp": "2024-07-10T10:30:00Z",
    "view": "observations",
    "filters": [],
    "window": "1h"
  }
}

The payload keeps the legacy monitor naming (type, monitorId, permalink) so existing integrations continue to work unchanged.

Signature verification works identically to prompt webhooks โ€” see Webhooks for the HMAC validation code.

GitHub Discussions


Was this page helpful?

Last edited