Skip to main content
Self-hosted version requirement: Access to alerts requires Helm chart version 0.10.3 or later.
Effective observability in LLM applications requires proactive detection of failures, performance degradations, and regressions. LangSmith’s alerts feature helps identify critical issues such as:
  • API rate limit violations from model providers.
  • Latency increases for your application.
  • Application changes that affect feedback scores reflecting end-user experience.
  • Unexpected cost spikes from LLM usage.
Alerts in LangSmith are project-scoped, requiring separate configuration for each monitored project.
Alerts can route to Slack, PagerDuty, Dynatrace, or any HTTP endpoint via webhook. The Webhook tab includes example recipes for Microsoft Teams, email, and Slack on self-hosted deployments.
Follow these steps to configure an alert.

Step 1: Navigate to create alert

In the UI, navigate to the Tracing project that you would like to configure alerts for. Click the Alerts icon on the top right-hand corner of the page to view existing alerts for that project and set up a new alert.

Step 2: Select metric type

LangSmith provides threshold-based alerting on the following metrics:
Metric TypeDescriptionUse Case
Run CountTracks the total number of runs over a time window.Monitor whether a pipeline is producing runs at the expected volume and alert when it drops unexpectedly.
CostTracks the total cost of runs over a time window.Monitor LLM spending to alert when costs exceed expected thresholds. Requires cost tracking to be configured.
ErrorsTracks runs with an error status. Alert on total error count or error percent (rate of errored runs out of all runs).Monitor for failures in an application, or alert when the error rate exceeds an acceptable threshold.
Feedback ScoreMeasures the average feedback score.Track feedback from end users or online evaluation results to alert on regressions.
LatencyMeasures average run execution time.Tracks the latency of your application to alert on spikes and performance bottlenecks.
Additionally, for Errors and Latency, you can use the filter builder to stack conditions on fields such as Status, Run Type, Tag, and Error. For example, you can scope an error alert to runs where Status is error, Run Type is llm, Tag is support_agent, and Error matches RateLimitExceeded.

Step 3: Define alert conditions

Alert conditions consist of several components:
  • Aggregation Method: Average, Percentage, or Count.
  • Comparison Operator: >=, <=, or exceeds threshold.
  • Threshold Value: Numerical value triggering the alert.
  • Aggregation Window: Time period for metric calculation (choose between 5 or 15 minutes).
  • Feedback Key (Feedback Score alerts only): Specific feedback metric to monitor.
Alert Condition Configuration
Example: The configuration in the screenshot would generate an alert when more than 5% of runs within the past 5 minutes result in errors. You can preview alert behavior over a historical time window to understand how many datapoints, and which ones, would have triggered an alert at a chosen threshold (indicated in red). For example, setting an average latency threshold of 60 seconds for a project lets you visualize potential alerts, as shown in the following screenshot.
Alert Metrics

Step 4: Configure notification channel

Send alert notifications directly to a Slack channel using LangSmith’s native Slack integration. No custom webhook or Slack app configuration required.
The native Slack notification type is available on LangSmith Cloud only. For self-hosted deployments, use the webhook Slack recipe in the Webhook tab instead.
Prerequisites
  • A Slack workspace connected to your LangSmith organization. If you haven’t connected one yet, LangSmith will prompt you to do so inline when you configure this notification type.

1. Configure the Slack notification

  1. In the Notification Settings section of your alert setup, select Slack.
  2. Click the channel selector. If no Slack workspace is linked yet, click Connect Slack and complete the OAuth flow to authorize LangSmith.
  3. Add the @LangSmith app to the channel you want to receive notifications in. The app must be a member of the channel — type /invite @LangSmith in the channel to add it.
  4. Select the workspace and channel from the dropdown. Click the refresh icon if the channel does not appear immediately.
  5. Click Save to save the notification configuration.

2. Test the integration

Click Send Test Notification to verify that LangSmith can reach the channel. Check the channel for the test message.

Notification format

When an alert triggers, LangSmith posts a structured Slack message that includes:
  • Headline: The alert name and your LangSmith workspace name.
  • Detail line: The metric attribute, triggered value, comparison operator, configured threshold, aggregation method, and time window — for example: Total Cost: $12.50 ≥ $5.00 · avg · 30 min.
  • Action buttons: View Alert (links to the alert preview in LangSmith) and View Runs (links to the filtered runs that triggered the alert).

Best practices

  • Adjust sensitivity based on application criticality
  • Start with broader thresholds and refine based on observed patterns
  • Ensure alert routing reaches appropriate on-call personnel