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.
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.
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.
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.
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.
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.
In the Notification Settings section of your alert setup, select Slack.
Click the channel selector. If no Slack workspace is linked yet, click Connect Slack and complete the OAuth flow to authorize LangSmith.
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.
Select the workspace and channel from the dropdown. Click the refresh icon if the channel does not appear immediately.
Click Save to save the notification configuration.
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).
Configure PagerDuty as a notification channel using PagerDuty’s Events API v2. This integration allows critical LLM application issues to trigger PagerDuty incidents, enabling rapid response through your established incident management workflow.Prerequisites
An active PagerDuty account with administrator access
Appropriate service-level permissions in PagerDuty
If on a custom deployment of LangSmith, make sure there are no firewall settings blocking egress traffic from LangSmith services.
To receive the same alert again within an hour of it being triggered, you must resolve the active incident created by the alert in PagerDuty.
In the notification section of your alert set-up in LangSmith, select PagerDuty
Click the key icon to save the Integration Key as a Workspace secret or select an existing Workspace secret. As a best practice, we recommend saving the Integration Key as a Workspace Secret rather than adding it directly. This will allow you to reuse the same key across alerts for a workspace.
Configure additional notification options:
Severity: Maps to PagerDuty incident priority
Send a test alert by clicking Send Test Alert
Verify the incident is triggered by PagerDuty and contains relevant LangSmith alert information
Verify the Integration Key is entered correctly in LangSmith
Ensure the PagerDuty service is active and not in maintenance mode
Check that your PagerDuty account has Events API v2 enabled
If an alert trigger appears to be missing in PagerDuty, check whether the expected trigger occurred within one hour of a previous trigger from the same alert rule, and whether the incident created by the previous alert is still open.
Review network connectivity if your LangSmith instance is behind a firewall
Configure Dynatrace as a notification channel using Dynatrace’s Events API v2. This integration sends LangSmith alert events to your Dynatrace environment, enabling correlation with your broader infrastructure monitoring.Prerequisites
An active Dynatrace environment (SaaS or Managed).
A Dynatrace API access token with the events.ingest scope.
If you’re working from a custom deployment of LangSmith, make sure there are no firewall settings blocking egress traffic from LangSmith services.
In the Notifications Settings for your alert setup in LangSmith, select Dynatrace.
Enter your Dynatrace environment URL.
Click the key icon to save the API token as a workspace secret or select an existing workspace secret. As a best practice, save the API token as a workspace secret rather than adding it directly. This allows you to reuse the same token across alerts for a workspace.
Configure additional notification options:
Event Type: Select the Dynatrace event type (e.g., CUSTOM_ALERT, ERROR_EVENT)
Send a test alert by clicking Send Test Notification.
Verify the event appears in your Dynatrace environment.
Webhooks enable integration with custom services and third-party platforms by sending HTTP POST requests when alert conditions are triggered. Use webhooks to forward alert data to ticketing systems, chat applications, or custom monitoring solutions.Prerequisites
An endpoint that can receive HTTP POST requests
Appropriate authentication credentials for your receiving service (if required)
In the Monitoring section of the LangSmith UI under the Alerts tab, click + Alert to create a. new alert.In the Notification Settings section, complete the webhook configuration with the following parameters:Required fields
URL: The complete URL of your receiving endpoint
Example: https://api.example.com/incident-webhook
Optional fields
Headers: JSON key-value pairs sent with the webhook request
Common headers include:
Authorization: For authentication tokens
Content-Type: Usually set to application/json (default)
X-Source: To identify the source as LangSmith
If no headers, use {}
Request Body Template: Customize the JSON payload sent to your endpoint
Default: LangSmith sends the payload defined and the following additional key-value pairs appended to the payload:
project_name: Name of the triggered alert
alert_rule_id: A UUID to identify the LangSmith alert. This can be used as a de-duplication key in the webhook service.
alert_rule_name: The name of the alert rule.
alert_rule_type: The type of alert (as of 04/01/2025 all alerts are of type threshold).
alert_rule_attribute: The attribute associated with the alert rule - error_count, feedback_score, latency, or cost.
triggered_metric_value: The value of the metric at the time the threshold was triggered.
triggered_threshold: The threshold that triggered the alert.
timestamp: The timestamp that triggered the alert.
LangSmith does not perform template substitution on the request body. The auto-populated fields above are merged into the outgoing JSON as top-level keys, alongside the body you configure. Placeholder syntax like {alert_rule_name} is sent verbatim to the receiving service. It only resolves to a real value if the receiver itself can extract fields from the incoming JSON (for example, a Power Automate Workflow, an AWS Lambda, or a custom HTTP handler).
Select the workspace where you want to install the app.
Click Create App.
Step 2: Configure bot permissions
In the left sidebar of your Slack app configuration, click OAuth & Permissions.
Scroll down to Bot Token Scopes under Scopes and click Add an OAuth Scope.
Add the following scopes:
chat:write (Send messages as the app).
chat:write.public (Send messages to channels the app isn’t in).
channels:read (View basic channel information).
Step 3: Install the app to your workspace
Scroll up to the top of the OAuth & Permissions page.
Click Install to Workspace.
Review the permissions and click Allow.
Copy the Bot User OAuth Token that appears (begins with xoxb-).
Step 4: Add the bot to a Slack channelAdd the bot to the specific channel you want to receive alerts in. You can add a bot to a Slack channel by mentioning it in the message field (e.g., @botname).You also need the channel ID to configure the webhook alert in LangSmith. You can find the channel ID by opening channel details > About.Step 5: Configure the webhook alert in LangSmith
In LangSmith, navigate to your project.
Select Alerts → Create Alert.
Define your alert metrics and conditions.
In the notification section, select Webhook.
Configure the webhook with the following settings:
Webhook URL
https://slack.com/api/chat.postMessage
Headers
Replace xoxb-your-token-here with your Bot’s User OAuth Token
It is required to fill in the {channel_id} from the value found in Step 4.
The remaining fields: alert_name, project_name and project_url optionally add additional context to the alert message. You can find your project_url in the browser’s URL bar. Copy the portion up to but not including any query parameters.
{ "channel": "{channel_id}", "text": "{alert_name} triggered for {project_name}", "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "🚨{alert_name} has been triggered" } }, { "type": "section", "text": { "type": "mrkdwn", "text": "Please check the following link for more information:" } }, { "type": "section", "text": { "type": "mrkdwn", "text": "<{project-url}|View in LangSmith>" } } ]}
Click Save to activate the webhook configuration.
Step 6: Test the integration
In the LangSmith alert configuration, click Test Alert.
Check your specified Slack channel for the test notification.
Verify that the message contains the expected alert information.
(Optional) Step 7: Link to the alert preview in the request bodyAfter creating an alert, you can optionally link to its preview in the webhook’s request body.To configure this:
Save your alert.
Find your saved alert in the alerts table and click it.
Copy the displayed URL.
Click “Edit Alert”.
Replace the existing project URL with the copied alert preview URL.
Configure Microsoft Teams notifications via webhook
Here is an example for configuring LangSmith alerts to send notifications to a Microsoft Teams channel using the Workflows app (Power Automate). This approach is recommended because it extracts fields from the incoming JSON within the flow, so the auto-populated LangSmith alert fields render correctly in the Teams message.
Microsoft’s legacy Office 365 Incoming Webhook connectors are being retired. Use the Workflows app for new integrations.
Prerequisites
Access to a Microsoft Teams workspace with permissions to add Workflows.
A LangSmith project to set up alerts.
Step 1: Create a Workflow in Teams
In Microsoft Teams, navigate to the channel where you want to receive alerts.
Click the … (More options) menu next to the channel name.
Select Workflows.
Search for and select the Post to a channel when a webhook request is received template.
Sign in to confirm the connections, then click Next.
Confirm the team and channel where alerts should be posted, then click Add workflow.
Copy the generated HTTP POST URL—use this in LangSmith.
Step 2: Customize the message in Power Automate (optional)The default workflow posts the raw JSON body as a card. To format alert details, edit the flow in Power Automate:
In the Adaptive Card field, reference incoming fields using triggerOutputs()?['body/alert_rule_name'], triggerOutputs()?['body/project_name'], triggerOutputs()?['body/triggered_metric_value'], triggerOutputs()?['body/triggered_threshold'], triggerOutputs()?['body/timestamp'], and triggerOutputs()?['body/alert_rule_url'].
Save the flow.
Step 3: Configure the webhook alert in LangSmith
In LangSmith, navigate to your project.
Select Alerts → Create Alert.
Define your alert metrics and conditions.
In the notification section, select Webhook.
Configure the webhook with the following settings:
Webhook URLPaste the HTTP POST URL from your Teams Workflow:
Request Body TemplateLangSmith automatically merges the auto-populated alert fields (alert_rule_name, project_name, triggered_metric_value, triggered_threshold, timestamp, alert_rule_url, and others) into the request body as top-level JSON keys. Power Automate reads these fields directly from the incoming payload, so an empty body is sufficient:
{}
Click Save to activate the webhook configuration.
Step 4: Test the integration
In the LangSmith alert configuration, click Send Test Alert.
Check your specified Teams channel for the test notification.
Verify that the card contains the expected alert information.
Reference implementationFor a working example that translates LangSmith webhook payloads (threshold alerts, run rules, and generic events) into formatted Teams Adaptive Cards, see the langsmith-teams-webhook sample repo. The sample runs as a small Python service in front of a Teams Workflow URL, which avoids customizing the Power Automate flow itself.
Configure email notifications via webhook
Here is an example for configuring LangSmith alerts to send email notifications using SendGrid’s Mail Send API. You can use any transactional email provider that exposes an HTTP API (e.g., Mailgun, Amazon SES, Postmark).Prerequisites
A SendGrid account with a verified sender identity.
Replace alerts@your-company.com with your verified sender address and oncall@your-company.com with the recipient address. SendGrid does not extract fields from arbitrary top-level JSON keys, so this example uses a fixed subject and body. To include alert-specific values in the email, route the LangSmith webhook through a middleware (such as a Power Automate flow, AWS Lambda, or Zapier webhook) that reads the incoming payload and renders the SendGrid request.
{ "personalizations": [ { "to": [ { "email": "oncall@your-company.com" } ], "subject": "LangSmith alert triggered" } ], "from": { "email": "alerts@your-company.com", "name": "LangSmith Alerts" }, "content": [ { "type": "text/plain", "value": "A LangSmith alert was triggered. Open your LangSmith workspace to view the alert details, including the project, metric value, threshold, and timestamp." } ]}
Click Save to activate the webhook configuration.
Step 4: Test the integration
In the LangSmith alert configuration, click Send Test Alert.
Check the recipient inbox for the test notification.
Verify the email contains the expected alert information.
Using other email providersThe same pattern works with other transactional email APIs that accept static authentication headers. Change the Webhook URL and Headers to match your provider:
Provider
Webhook URL
Auth header format
Mailgun
https://api.mailgun.net/v3/{your-domain}/messages
Authorization: Basic <base64(api:<key>)>
Postmark
https://api.postmarkapp.com/email
X-Postmark-Server-Token: <token>
Adjust the Request Body Template to match each provider’s expected payload format. Amazon SES is not directly compatible because the SES API requires per-request AWS SigV4 signing, which cannot be expressed as a static header. To use SES, route through a middleware (for example, a Lambda function with an HTTP trigger).