API referenceConsole
Cloud provider
Polylane maps your Trigger.dev tasks, schedules and queues, reads failed runs with their traces and logs to find the cause, and writes the fix in your code.

Connect

Connect Trigger.dev from the terminal. Pass --help for the flags Trigger.dev accepts, plus --no-browser for headless environments.

Terminal
polylane cloud connect --provider triggerdev

How it works

Resources in the context graph

Polylane maps the environment, its deployments with the current one, tasks, schedules and queues. A task that appears in runs but not in the current version stays in the graph with a flag. Polylane syncs every 15 minutes, and records a deployment event when the current deployment changes. Runs are not resources in the graph. Polylane reads them when it needs them.

Checks and anomaly detection

Polylane reads your runs with TRQL, the SQL dialect of Trigger.dev. Nine account checks watch the environment:

  • the share of finished runs that failed, crashed or had a system failure
  • crashed runs, runs that time out at maxDuration, and runs that expire in the queue
  • the p95 queue wait time and the number of queued runs
  • failed deployments
  • schedules that missed a run
  • new error groups

The same checks also run for each of your 20 busiest tasks of the last day, so a failing task has its own name in the issue. Each chart and number widget on your Trigger.dev query dashboards becomes a check too. Tasks, schedules and the environment also get their own monitors, which read the runs, the logs and traces of recent failed runs, and queue metrics.

Run failures become issues

With the webhook alert, a failed run opens an issue, or adds to the open issue for the same task and error. An out-of-memory failure is critical. Test runs are skipped. Deployment events from the alert go to watches on the environment, but they do not open issues. The failed deployments check catches a failed deployment. Polylane triages each issue and investigates it.

What agents can do

During an investigation, agents query run history with TRQL, list and read runs with their attempts, read error groups, and read the trace tree and log events of a run. They also read deployments, schedules, queues and queue metrics, and can set a watch that wakes a thread when the next deployment lands.

Webhook alerts

Trigger.dev webhook alerts send run failures and deployment events to Polylane. Add one alert for each environment:

  1. On the Alerts page of the environment, add a webhook alert. Use the URL from the Webhooks card on the account's Settings page in Polylane. It has the form https://sinks.polylane.com/v1/triggerdev/<project ref>/<environment slug>.
  2. Select the "Task run failure", "Deployment failure" and "Deployment success" events.
  3. Trigger.dev shows a signing secret one time. Paste it into the same Webhooks card.

Polylane checks the signature of each delivery with that secret, and refuses a delivery that it already received.

Troubleshooting

"Polylane needs a key created with the 'No restrictions' preset"

  • Polylane reads the identity of the project through an endpoint that only a "No restrictions" key can call. Trigger only, Observer, Deploy only, Task operator and Variables only keys do not work. Create a "No restrictions" key on the API Keys page of the environment and connect it.

"Trigger.dev did not recognize this key"

  • Make sure you copied the full key and that it is not revoked.

"Dev keys only work while trigger dev runs" and "Preview keys are per branch and not supported"

  • Use a prod or staging key.

Webhook deliveries do not arrive

  • The signing secret must be the secret that Trigger.dev showed for the alert of this environment. If you created the alert again, save its new secret.
  • Each alert needs the URL from the Webhooks card of its own environment. Polylane refuses a payload that names a different environment or project with a 400.

Missing resources

  • Click Sync in the account header to sync before the next scheduled sync.

Disconnecting

Disconnecting does not change Trigger.dev. Delete the webhook alert on the Alerts page of the environment, and delete the key on its API Keys page.

Disconnect

Disconnecting stops every sync and check and deletes the credentials Polylane held. Polylane removes what Trigger.dev's API lets it remove. The following stays until you remove it yourself:

  • Trigger.dev webhook alert
Terminal
polylane cloud disconnect <id>

Tools

5

Operations agents can perform in threads.

triggerdevRuns
List Trigger.dev runs with filters, retrieve one run with its attempts, or read the error groups failed runs fold into
triggerdevRunTelemetry
Read a Trigger.dev run's trace tree or its log events
triggerdevQuery
Query Trigger.dev run history with TRQL, or read its schema and dashboard queries
triggerdevInventory
Read what a Trigger.dev environment is made of: deployments and the current one, bulk actions, schedules, queues and a queue's wait time and depth metrics
triggerdevApi
Call the connected Trigger.dev REST API

Supported resources

5

Resource types that show up in your infrastructure graph.

Environment
Task
Schedule
Queue
Deployment