AceDocs
Integrations

Temporal

Connect Temporal Cloud or a self-hosted server so failed workflows open incidents, and Ace can pause schedules, roll workers back or reset workflows after approval.

Failed and timed-out Temporal workflows open incidents in Ace, one per workflow type. On a self-hosted server, Ace can also pause a schedule, roll a worker deployment back, or reset failed workflows once the fix is live.

CategoryJobs
Ace readsOn Temporal Cloud: namespace metrics and configuration, and the audit log with a Global Admin key. On a self-hosted server: failed workflows and their failures, task queue workers and backlog, worker deployments and schedules
Ace can changeOn a self-hosted server only: pause or unpause a schedule, roll a worker deployment back, reset failed workflows, only after an admin allows actions
Opens incidentsYes, for failed and timed-out workflows of workloads that route Temporal. On Temporal Cloud, also for throttled namespaces and task queues with no workers
SetupSettings form. Temporal Cloud uses service account API keys, and a self-hosted server its HTTP API

What it reads

The Deployment field decides how Ace reads Temporal. Temporal Cloud serves workflows only over gRPC, so Ace reads its metrics and Ops API instead. A self-hosted server's HTTP API serves the workflows themselves, and Ace doesn't use gRPC.

Ace reads the namespaces in the Namespaces field, or every namespace when it's empty, while it investigates a workload that reads Temporal under Observability in the workload's settings, or routes its alerts.

Temporal Cloud

  • The latest metrics minute: workflows failed, timed out and completed per minute, by workflow type and task queue.
  • Each namespace's actions per second against its limit, throttled actions and resource-exhausted errors.
  • Task queues whose tasks no worker polls, with their backlog and the oldest task's wait.
  • Namespaces from the Ops API, with active region, replicas, retention, actions-per-second limit, state and last change, and the account's Nexus endpoints.
  • Audit log entries in the incident window: each operation, when, by whom and whether it succeeded. This needs a key with the Global Admin role.

Temporal Cloud allows 180 metrics requests an hour per account, shared with every scraper you run. Ace reads metrics at most once every 5 minutes. Each investigation read and each Blueprint refresh uses one more.

Self-hosted server

  • Workflows that failed, timed out or were terminated in the incident window, by namespace and workflow type.
  • Up to five recent runs per type, with their failure.
  • One run's status, task queue, build, timing, failure and pending activities with their attempts and last failure. Ace leaves out inputs, results and payloads.
  • A task queue's pollers and backlog, for workflow and activity tasks.
  • Worker deployments with their current and ramping build, and earlier versions.
  • Schedules, paused or not, with their workflow type and recent and next runs.

A failure encoded by your payload codec shows only that the workflow failed.

On both, Ace reads the incident's workflow type after a fix, to confirm it works again. On Temporal Cloud it estimates this from the metric minutes it stored, which sample about one minute in five.

For the Blueprint, Ace reads namespaces and task queues with their workflow types. On Temporal Cloud it adds Nexus endpoints when it can read the Ops API. On a self-hosted server it adds schedules and worker deployments from up to 10 namespaces.

What it can change

Ace can change Temporal only on a self-hosted server, after an admin turns on Actions. Temporal Cloud serves these writes only over gRPC, so Ace never proposes them there. See Actions and approvals.

ActionWhat it doesApprovalUndo
Schedule pausePauses a schedule so it starts no new workflows, or unpauses it. Running workflows continue.Approval onlyYes. Restores the previous state.
Worker deployment rollbackMakes an earlier build of a worker deployment current again, by default the one current before. New and auto-upgrading workflows run on it.Approval, or AutomaticYes, when a build was current before. Makes the replaced build current again.
Failed workflow resetResets one workflow type's failed and timed-out workflows from the incident window to their last workflow task, in stages, up to 200, each once. It waits for the fix to deploy.Approval onlyNo

Safeguards:

  • Ace refuses a schedule pause or a rollback if someone changed the schedule or the deployment's current build since approval.
  • A rollback writes with Temporal's conflict token. Ace refuses a drained build, and Temporal refuses a build no worker polls.
  • A reset skips workflows retried or reset since the plan. Activities after the reset point run again, and later signals are reapplied.
  • Ace rechecks the incident between stages.
  • Unpausing a schedule Ace paused still runs after Stop all actions, because it brings back what the pause stopped.

Ace sends Temporal only these three writes. It refuses terminating, cancelling, signalling, starting or deleting workflows, batch jobs, namespace updates and admin APIs before they leave Ace, whatever the token allows.

Ace can't check a token's write permission before it writes, so Settings shows Checked when it runs. A Temporal Cloud connection has no Actions section.

What opens an incident

Failures open incidents only on workloads that route this connection, and Ace polls only routed connections, every 2 minutes. Each incident is high severity.

Temporal showsWhat Ace does
Failed or timed-out workflowsOpens or joins an incident for that workflow type in its namespace. On a self-hosted server, terminated workflows count too.
Throttled actions or resource-exhausted errors in a namespace (Cloud)Opens an incident for the namespace, and closes it when throttling stops.
A task queue with no worker polling and a backlog older than 2 minutes that keeps aging (Cloud)Opens an incident for the queue, and closes it when workers poll again.

On Temporal Cloud, Ace sees failures in one metrics minute every few minutes, so it counts a sample, not each run. A self-hosted poll reads each run, up to 200 per namespace and 20 namespaces.

When a metrics read fails, Ace waits before reading again. It waits at least 15 minutes after a 429, or longer when Temporal asks, an hour after a refused key, and 15 minutes after a server error. When Temporal cuts a metrics answer short, Ace opens what it shows and closes nothing from it.

Changes join the change ledger. On a self-hosted server, a worker deployment's new current build is a deploy.

On Temporal Cloud, Ace reads namespace changes such as retention, limits and failover every 5 minutes. They come from the Ops API, or from the audit log with a Global Admin key.

Before you start

  • The admin role in Ace.
  • For Temporal Cloud, an Account Owner or Global Admin, to create service accounts.
  • For a self-hosted server, its frontend's HTTP API (port 7243 by default) over HTTPS, reachable from the internet. Worker deployments need Temporal 1.27 or later.

Credentials and permissions

CredentialDeploymentPermissionWhy Ace needs it
Metrics API keyTemporal CloudA service account with the account role Metrics Read-OnlyFailures, throttling and task queues from Temporal Cloud metrics.
Inventory API keyTemporal Cloud, optionalA second service account with the account role Read-OnlyNamespaces, limits and Nexus endpoints for the Blueprint, and namespace changes for the timeline.
Same key, for the audit logTemporal Cloud, optionalThe account role Global Admin instead of Read-OnlyAudit log entries for namespace and Nexus changes.
Bearer tokenSelf-hosted, only with an authorizerRead on each namespaceWorkflows, task queues, schedules and worker deployments.
Same token, for actionsSelf-hostedWrite on each namespacePause schedules, roll worker deployments back and reset workflows.

A Temporal Cloud connection sends only reads, whatever the key's role allows. Without an inventory key, Ace tries the metrics key on the Ops API.

Under Temporal's default authorizer, a token's permissions claim grants <namespace>:read or <namespace>:write. See Temporal's security guide. Ace stores keys and tokens encrypted.

Set up

1. Create a key or a token

Temporal Cloud

  1. As an Account Owner or Global Admin, open Identities > Service Accounts. Create a service account named Ace with the account role Metrics Read-Only.
  2. In API Keys, create a key for that service account and copy it. Temporal shows it once.
  3. Optional: create a second service account named Ace inventory with the account role Read-Only, then create a key for it the same way.

Self-hosted server

  1. Expose the frontend's HTTP port (7243 by default) over HTTPS at an address reachable from the internet.
  2. If the server has an authorizer, issue a token with read on each namespace Ace reads, or write for actions.

2. Connect Temporal

  1. Open Settings > Integrations > Temporal.

  2. Choose Deployment: Temporal Cloud or Self-hosted server. The form shows that deployment's fields.

  3. Fill in the form:

    FieldDeploymentWhat to enter
    Metrics API keyTemporal CloudThe Metrics Read-Only key.
    Inventory API keyTemporal CloudOptional. The Read-Only key.
    HTTP API URLSelf-hostedThe frontend's HTTP API, such as temporal.example.com:7243.
    Bearer tokenSelf-hostedOnly if the server has an authorizer.
    Temporal UI URLSelf-hostedOptional, for links to workflows, such as temporal-ui.example.com.
    NamespacesBothOptional. Comma-separated, such as payments.a1b2c on Temporal Cloud. Leave empty to read every namespace, up to 20 on a self-hosted server.
  4. Select Connect Temporal. On Temporal Cloud, Ace checks that the metrics key reads metrics and the inventory key reads namespaces. On a self-hosted server, it checks that the HTTP API answers and every listed namespace exists.

With Namespaces empty on a self-hosted server, Ace saves the first 20 namespaces it can list. Temporal's default authorizer lists namespaces only for a token with temporal-system:read, so otherwise name them.

3. Route failures to a workload

In the workload's settings, open Alerts (https://app.tryace.dev/workloads/<workload-id>/settings/alerts), tick Temporal under Sources and turn on Investigate alerts. Polling starts within a few minutes.

4. Optional: allow actions

Only on a self-hosted server.

  1. In the Actions section, turn the switch On.
  2. To let worker deployment rollbacks run under an Automatic policy, choose a workload, enter its environment and select Confirm workload.

Set up with an agent

Copy this prompt into a coding agent, or open it in one with the logos below it. The agent does the Temporal side in your terminal and asks you for each decision and each step in a browser. See how agent setup works.

Help me connect Temporal to Ace. Read https://tryace.dev/docs/integrations/temporal/agent.md and follow it step by step. Ask me whenever you need a decision or something only I can do.

Open in

Confirm it's working

  • The connection card shows Synced, and Sync now rechecks the credentials. A failed check names the problem, such as a missing role or a namespace the server doesn't have.
  • If polling fails for 10 minutes, the page header shows Needs attention.
  • On Temporal Cloud, a revoked or throttled metrics key doesn't fail the poll. Ace waits and tries again, so select Sync now to recheck the key.
  • Incidents for failed workflows appear on the routed workload after the next failure.

Disconnect

  1. In Ace, open Settings > Integrations > Temporal, select Disconnect, then Disconnect Temporal. To stop only actions, turn Actions off instead.
  2. On Temporal Cloud, delete the Ace keys in API Keys and the Ace service accounts in Identities > Service Accounts.
  3. On a self-hosted server, revoke the token in your authorizer.

Next steps

On this page