Logs and errors
Connecting your logs lets Dev see what your code does once it's running, not only what it says on the page. When you're chasing a production bug, Dev can look up the errors behind it, tie a stack trace back to the code that produced it, and check the logs after a deploy to confirm a fix behaves as expected.
You can connect Axiom for logs, Sentry (Beta) for errors, crashes and monitors, and Better Stack (Beta) for uptime monitors, scheduled-job check-ins, logs and errors. Connect them in Project settings → Integrations → Log providers, or from Connect logs under Optional connections for later at the end of project setup. Logs are optional, and you choose exactly which Axiom datasets, Sentry projects or Better Stack items Dev may use.
Why connect your logs
Without logs, Dev can only reason about your code. With a log provider connected, you can ask things like:
- "What errors has the API thrown in the last hour?"
- "Why are checkout requests slow this morning?"
- "Did the fix we shipped stop the timeout errors?"
- "Which Sentry issues started after yesterday's release, and how many users did they hit?"
- "Is any of our Better Stack monitors down, and what did the failing response say?"
Dev searches the datasets and projects you've allowed, reads what comes back, and connects it to the code in your repositories. It searches your logs when a conversation calls for it.
Connect a log provider
Project Maintainers connect log providers.
- Open Project settings → Integrations → Log providers and click Add provider.
- In Connect a log provider, fill in:
- Name: a label for you, such as "Production logs" or "Staging". It doesn't need to match anything in your provider.
- Environment (optional): which environment these logs cover (see "Tag environments" below).
- Provider: Axiom, Sentry or Better Stack. Sentry and Better Stack carry a Beta badge.
- Fill in the token and settings for your provider, as described in the sections below.
- Tick the datasets, Sentry projects or Better Stack items Dev may use (see "Choose what Dev can search" below).
- Click Connect.
DevSpec checks that it can reach your provider before it saves the connection. You can connect more than one account, for example one for staging and one for production. Each connection shows its provider, its environments, what Dev can search, and its status: Connected, Connecting…, Needs reconnect or Error.
DevSpec also records the connection in the project's Inventory, with its name, provider and environments. The token is never recorded there.
Create an Axiom token for DevSpec
Create an API token in Axiom that is limited to the datasets you want Dev to search and has an expiration date. Do not use a personal access token (PAT), which carries full control over your Axiom account. The connect form shows these steps under How to create your token:
- In Axiom, go to app.axiom.co/settings/api-tokens and click Create token (or New API token).
- Give it a name, such as DevSpec, and set an Expiration date so the token rotates on a schedule. Description is optional.
- Optionally, under Query cost limits, set an hourly and a daily budget in dollars to cap what Dev's searches can cost you. Leave No limit if you'd rather not cap them.
- Under Token Permissions, choose Advanced permissions — Custom. Don't use Preset — Terraform.
- Leave All datasets unticked. Under Individual datasets, find only the datasets for this project and tick Query → Read (or keep projects in separate Axiom organizations if you want a hard wall between them). Leave Ingest, Share, Starred queries, Trim, Vacuum and Virtual fields off.
- Under Org level permissions, tick only Datasets → Read, so DevSpec can list your dataset names for you to pick from when connecting. Leave everything else off.
- Click Create and copy the token. It starts with
xaat-and Axiom shows it only once.
DevSpec only reads your logs. It never writes anything to Axiom.
When a token's query cost limit is used up, Axiom refuses queries — including the test search DevSpec runs when you connect or check the connection — until the limit resets: hourly limits at the top of the hour (UTC), daily limits at midnight UTC. Raising the limit in Axiom lets you connect and lets Dev search again straight away. Query cost limits are available on Axiom's Cloud and Enterprise Cloud plans.
Connect Axiom
Choose Axiom as the Provider, then:
- Paste the
xaat-…token into API token. There is no region or EU API address to choose: DevSpec lists datasets throughapi.axiom.coand sends each search straight to the US or EU edge deployment where Axiom stores that dataset. - Your datasets load under Datasets the AI can search once you've entered the token (or click Fetch datasets). Tick the ones Dev may search, and click Connect.
Create a Sentry token for DevSpec
Sentry offers three kinds of authentication tokens with different reach:
- Personal tokens (User Auth Tokens, under Account → Settings → User Auth Tokens at sentry.io/settings/account/api/auth-tokens, starting with
sntryu_…) can reach every Sentry organization and project that the user who created the token can access. - Internal Integrations (under Settings → Developer Settings → Custom Integrations → Create New Integration → Internal Integration) are owned by the Sentry organization rather than one user, and can see every project in that Sentry organization.
- Organization Tokens (under Settings → Developer Settings → Organization Tokens, starting with
sntrys_…) are for CI source-map uploads and release bundling (org:ci) only, and cannot read issues or events.
For the narrowest access, create a personal token (User Auth Token) from a Sentry account whose membership is limited to this project's teams, with only the three read scopes:
- Signed in as an account limited to this project's teams, go to sentry.io/settings/account/api/auth-tokens and create a token.
- Give it a name, such as DevSpec, and tick only Organization → Read (
org:read), Project → Read (project:read) and Issue & Event → Read (event:read). Leave every write and admin permission off. - Create the token and copy it.
If you prefer an organization-owned token that doesn't depend on one person's account, create an Internal Integration under Settings → Developer Settings → Custom Integrations → Create New Integration → Internal Integration, set Organization, Project and Issue & Event to Read, save it, and copy its token — keeping in mind that the token itself can see every project in the Sentry organization.
With these read-only permissions, DevSpec never changes anything in Sentry. If you want DevSpec to close the loop on errors your work fixes, give the token Issue & Event → Read & Write (event:write) instead: when every task linked to a Sentry error is done (tasks that were dismissed don't count), DevSpec adds a note to the error saying what was done and marks it resolved. With a read-only token, the linked tasks still finish and the error is left as it is. See Tasks for linking a task to an error.
Connect Sentry
Choose Sentry as the Provider, then:
- Paste the token into Auth token.
- DevSpec finds your Sentry organization and region (US or EU cloud) from the token. Open Advanced (optional) only if you need to:
- Organization slug: your Sentry organization's slug. Leave it blank to detect it from your token.
- Base URL: only for self-hosted Sentry.
- Your Sentry projects load under Sentry projects the AI can access once you've entered the token (or click Fetch projects). Tick the ones Dev may search, and click Connect.
Create Better Stack tokens for DevSpec
Better Stack keeps Incidents (uptime monitors and scheduled-job heartbeats) and Telemetry (logs and error tracking) apart, each with its own token. Create a read-only team token for each part you use. Either one on its own is enough.
- In Better Stack, go to betterstack.com/settings/global-api-tokens and open the Team-based tokens tab. Pick the team whose monitors or sources DevSpec should see.
- Name the token, such as DevSpec, set Application to Incidents, set Access level to Read only, and click Create. Copy the new token.
- For logs and errors, create a second token the same way with Application set to Telemetry and Access level set to Read only.
With Read only, Dev can look at everything you allow and cannot change anything in Better Stack; linked incidents and errors are left for you to resolve. Choose Read & write only if you want DevSpec to close the loop when your work finishes: when every task linked to a Better Stack incident is done, DevSpec comments on the incident with what was done and resolves it, and when every task linked to a Better Stack error is done, DevSpec marks the error resolved. In Better Stack's API, Read & write also allows a token to change team members' roles (including organization-wide roles such as admin and billing_admin), so leave Access level on Read only unless you want DevSpec to resolve incidents and errors for you. See Tasks for linking a task to an incident or error.
Reading logs also needs a Better Stack role that can view Live tail.
You can use one Global API token (on the same page) instead of team tokens. A global token reaches every Better Stack team and product, so prefer the two team tokens. With a global token, put the team's name in Team name so DevSpec reads only that team.
Connect Better Stack
Choose Better Stack as the Provider, then:
- Paste your tokens into Incidents API token and Telemetry API token. Leave either one blank if you don't use that part. Open Advanced (optional) only to use a global token and its team name instead.
- Your monitors, heartbeats, log sources and error apps load under What the AI can access (or click Load from Better Stack). Tick the ones Dev may use, tag their environments, and click Connect.
One Better Stack team often watches more than one product, or another company's sites. Tick only the items that belong to this project. The connection shows its Better Stack team, and an item that later disappears from Better Stack stays listed as missing until you untick it.
Choose what Dev can search
When you enter your token, DevSpec lists your Axiom datasets, Sentry projects, or Better Stack monitors, heartbeats, log sources and error apps.
None are selected until you pick them. Tick each one Dev is allowed to search, or use Select all and Select none. You must choose at least one before you can connect.
Dev starts every search from the items you selected. For Sentry and Better Stack, a request for any unselected project or item is refused. For Axiom, DevSpec checks that the dataset each search starts from is one you selected, while in Axiom an APL query (for example using union) can still reference other datasets if the Axiom token itself has permission to read them — so limit your Axiom API token under Individual datasets to only this project's datasets, or use a separate Axiom organization if you want a hard wall between projects. To change the selection later, use Reconnect / rotate token on the connection.
Keep in mind that everyone who can ask Dev a question in this project's sessions can ask it to search these datasets and projects. Leave out anything your whole project team shouldn't see.
Tag environments
You can say which environments a connection covers: Production, Staging, Preview or Development. Pick one in Environment (optional), tick several of the environment tags under it, or leave it on Not tied to one environment.
When one account holds logs for several environments, tag each dataset or Sentry project instead: once you tick a dataset or project, its own environment tags appear under it. For example, tag your api-staging dataset Staging and api-production Production.
The tags show on the connection and are recorded in the project's Inventory. They also tell Dev where to look: ask about errors on staging and Dev searches the datasets tagged Staging. With Sentry, Dev can also narrow a search to one of Sentry's own environments.
What Dev does with your logs and errors
When a question in a session needs runtime evidence, Dev queries what you allowed over the relevant time window and connects what it finds to the code in your repositories.
- Axiom: Dev searches your logs and traces, and summarizes error patterns, request volumes and slow requests.
- Sentry: Dev can look at your issues (unresolved ones, unless you ask about a past period), a single issue in full with its stack trace, the steps the user took before it happened, the release it appeared in and how many users it affected, user feedback and crash reports, uptime and scheduled-job monitors (failing ones, unless you ask otherwise), performance slowdowns, and logs.
- Better Stack: Dev can look at your monitors, including the status, headers and body Better Stack captured when one failed. It can also see incidents and their timelines, heartbeats that missed a check-in or reported a failure, certificate and domain expiry warnings, log lines from your sources, and grouped errors with where they were thrown and how often they happened. Better Stack's API doesn't return full stack traces; Dev gives you the link to open one. Certificate and domain expiry checks are switched on per monitor in Better Stack and need a paid Better Stack plan.
Dev never changes anything in your provider while it looks. The only changes DevSpec makes are the Sentry and Better Stack resolutions described above, when linked tasks are done and the token allows it. Your agents don't query your logs through DevSpec; log search is something Dev does.
Crashes and outages on Delivery
When Sentry or Better Stack is connected, DevSpec also watches it alongside your deploys. A new crash spike, or a resolved error coming back, shortly after a deploy is linked to that deployment on Delivery, and DevSpec asks the agent whose work went out to look first. If no agent takes it up, DevSpec opens an incident. A monitor reporting an outage, a scheduled job missing its check-in or reporting a failure, or a Better Stack certificate or domain expiry warning, opens an incident that clears by itself once the monitor recovers, the job checks in again or the certificate is renewed. A failure that began before your latest deploy is never blamed on it. Errors that were already there, warnings and user feedback never open an incident.
Environment tags help here too: a crash in Sentry's staging environment, or a Better Stack monitor tagged Staging, is matched to your staging deployment, not production. See Delivery and Incidents.
Rotate the token, change what Dev can search, or disconnect
To paste a new token, change the region, rename the connection, change its environments or change what Dev may search, a Maintainer clicks Reconnect / rotate token on the connection in Project settings → Integrations → Log providers.
- Leave the token field blank to keep the current token, or enter a new one to replace it.
- DevSpec reloads your list of datasets or projects, so ones you've added since you connected appear. Adjust the ticks and environment tags.
- Click Save.
If a token expires or is revoked, the connection shows Needs reconnect and an icon appears in the project header. Create a new token in your provider and use Reconnect / rotate token to replace it.
Disconnect a log provider
To disconnect, a Maintainer clicks Disconnect provider on the connection, then Disconnect to confirm. Dev stops querying that account. This can't be undone; to use the account again, connect it again. Delete the token in your provider too if nothing else uses it.
What log searches cost
Dev's log searches are part of its replies. They're charged to your organization's balance with the rest of the reply and count toward your personal allowance, like the rest of the reply. There's no separate charge for having a log provider connected. See Billing, usage and limits.
The queries themselves run on your Axiom, Sentry or Better Stack account, so they also count toward that account's usage and limits on your plan.