queue deployment runs automation rules. To enable its Prometheus endpoint, set SAQ_METRICS_PORT to a positive port number, such as 9090, in the Helm value queue.deployment.extraEnv. The default is 0, which disables the endpoint. The Helm chart does not create a Service for queue, so configure your collector to scrape /metrics on that port directly on the queue pods.
The backend API serves the three queue depth gauges on its own /metrics. For the backend endpoint and general export configuration, see Export LangSmith telemetry to your observability backend.
Names are as they appear on /metrics. If your collector adds a namespace or prefix, adjust accordingly. The telemetry metrics list shows the same metrics with a self_hosted_ prefix, the names your instance exports to LangChain.
For the tabbed Datadog and Grafana dashboards and their collection requirements, see Monitor self-hosted LangSmith with Datadog or Grafana.
This page covers metrics that the rule worker emits. Also monitor these signals from your infrastructure monitoring:
- Kubernetes: OOM kills, container restarts, and CPU and memory against limits on the
queuepods. - Redis: memory use against its limit, and evicted keys. The rules queue and the bookmarks of skipped rules live in Redis.
Scheduler
Once a minute, the scheduler enqueues one job per rule window that is due. The threelangsmith_saq_queue_* gauges count those jobs and are served by the backend API, not the queue deployment. Every backend pod reports the same value for the whole queue.
langsmith_run_rules_bookmark_write_failures_total
Counter
Failed Redis pipelines when writing the bookmark of a skipped rule. After a failure, the scheduler writes that batch and the rest of the tick’s bookmarks to PostgreSQL instead, so rule progress is kept. The counter adds at most one per scheduler tick. A non-zero rate points at a Redis problem and adds PostgreSQL writes.
Query: Use the rate, summed across pods.
langsmith_saq_queue_queued
Gauge
Rule jobs waiting for a worker. Growth that continues while traffic is stable is the first sign that the rule workers do not keep up. Confirm with langsmith_run_rules_window_lag_seconds, then add queue replicas.
Query: Filter on queue_name="rules". Use max across pods, not sum.
langsmith_saq_queue_active
Gauge
Rule jobs a worker is running now.
Query: Filter on queue_name="rules". Use max across pods, not sum.
langsmith_saq_queue_scheduled
Gauge
Rule jobs scheduled for a later time.
Query: Filter on queue_name="rules". Use max across pods, not sum.
Worker
An attempt is one job that applies a rule to part or all of a window. A window can take multiple jobs, and each retry counts as a separate attempt. The metrics below follow an attempt from window lag and unit pickup latency to action results and the overall result. Theapplier_* metrics describe the actions that run during each attempt. See Labels for which labels each metric declares.
langsmith_run_rules_window_lag_seconds
Histogram
Time from the end of the window to the start of a live attempt. A rule catching up after a pause trails by hours without being stuck. A lag that rises while traffic is stable means rules are falling behind. Backfills are excluded.
Query: The highest bucket is 86400 s. Use max across pods.
langsmith_run_rules_run_pickup_latency_seconds
Histogram
Time from a run, thread, or trajectory becoming eligible to a rule picking it up. For a thread or trajectory, the project’s idle window is excluded. Backfills are excluded.
Query: The highest bucket is 86400 s. Split by unit_kind and by source to find the slow action type.
langsmith_run_rules_applier_runs_processed_total
Counter
Per action, how many units it was handed. A unit is a run, a thread, or a trajectory, by the rule’s unit_kind. A rule with two actions over 50 units adds 100.
Query: Use the rate, summed across pods. Split by source to see which action type does the work.
langsmith_run_rules_applier_run_outcomes_total
Counter
Per action, one per unit that came back with a result, split by success or error. An action can receive a unit without returning an outcome for it. result="error" means the action reported an error for that unit. The metric does not identify the cause. The outcome label carries the same value as result.
Query: Use the rate, summed across pods. Split by source and result.
langsmith_run_rules_applier_results_total
Counter
One count per action that runs during an attempt, labeled with its result: success, error, or skipped. If an attempt runs both an evaluator and a webhook, it adds two counts, one for each action. A retry adds a count for each action it runs again. result="error" means the action failed during that attempt. The share of result="success" per source is the success rate of that action type.
Query: Use the rate, summed across pods. Split by source and result.
langsmith_run_rules_applier_duration_seconds
Histogram
Time one action took during one attempt. Rising for one source points at that action’s model or endpoint. Rising for all points at capacity.
Query: The highest bucket is 600 s. Split by source.
langsmith_run_rules_apply_run_rule_results_total
Counter
One count per attempt, labeled with its result: success, skipped, or error. Each retry of a window adds another count. A rate of zero while runs arrive means the worker is not recording attempts. On result="error", fault="user" means you need to act, for example to fix the rule’s configuration or raise a workspace usage limit, and fault="system" means a LangSmith problem. LangSmith can retry a window after a transient_error, but not after a permanent_error.
Query: Use the rate, summed across pods. Split by result, then by error_type and fault for errors. Filter on pointer_type="live" to leave out backfills.
langsmith_run_rules_apply_run_rule_duration_seconds
Histogram
Time one attempt took, from job start to its result. Rising duration can indicate a capacity issue or a slow dependency. To compare action types, use langsmith_run_rules_applier_duration_seconds instead.
Query: The highest bucket is 600 s, so percentiles do not show longer attempts. Split by result.
Specific applier types
Only custom code evaluators record metrics of their own. The other action types are covered by theapplier_* metrics above.
langsmith_run_rules_code_evaluator_missing_at_dispatch_total
Counter
Code evaluator rules that reached dispatch without their code. result="error" is a rule whose evaluator has no code. result="success" is code that loaded late.
Query: Use the rate, summed across pods.
langsmith_run_rules_code_evaluator_feedback_truncated_total
Counter
Code evaluator applications whose feedback fetch hit the row limit, so some feedback was left out of the evaluator payload.
Query: Use the rate, summed across pods.
langsmith_run_rules_code_evaluator_result_failures_total
Counter
Code evaluator results that did not succeed, for example a sandbox timeout, and were written as error feedback instead of a score.
Query: Use the rate, summed across pods. Split by status.
Labels
All metrics in the Worker table andlangsmith_run_rules_code_evaluator_missing_at_dispatch_total declare source, unit_kind, pointer_type, and rule_owner. Additional labels depend on the metric. The names below omit the langsmith_run_rules_ prefix:
apply_run_rule_*,applier_results_total,applier_duration_seconds, andcode_evaluator_missing_at_dispatch_totalalso declareresult,error_type, andfault.applier_run_outcomes_totalalso declaresresultandoutcome.window_lag_seconds,run_pickup_latency_seconds, andapplier_runs_processed_totaldeclare no additional labels.
bookmark_write_failures_total and code_evaluator_feedback_truncated_total have no labels. code_evaluator_result_failures_total has only status. The queue depth gauges use queue_name to identify the queue.
Histograms are exported with Prometheus buckets. If your collector converts them to distributions, as the Datadog OpenMetrics check does, query percentiles from the distribution rather than from
_bucket series.
Terms
Connect these docs to your agent of choice via MCP for real-time answers.

