A Sentry API mock for investigating application errors.
Your agent reads seeded Orders API issues and stack traces, then records a release. Check the release request and retrieve its version, projects and deploy history.
release_createdCalls POST /api/0/organizations/*/releases/
Starting records
releases
- version
orders@4.11.0
members
- ref
ancha- name
Ancha assistantancha@acme.example
Connect your agent to the Sentry mock
When ancha runs your agent, it sets:
SENTRY_API_URLSENTRY_AUTH_TOKEN
Point the client you already use at them.
const sentry = (path: string) => fetch(`${process.env.SENTRY_API_URL}/api/0/${path}`, { headers: { Authorization: `Bearer ${process.env.SENTRY_AUTH_TOKEN}` } });
const [org] = await (await sentry('organizations/')).json();
const res = await sentry(`organizations/${org.slug}/issues/?query=${encodeURIComponent('is:unresolved')}&statsPeriod=24h`);
const issues = await res.json();
// res.headers.get('link') carries the next page's cursor (rel="next"; results="true"; cursor="...").Locally, ancha runs your agent as an ordinary process, so keep real Sentry credentials out of its environment.
See all 32 endpoints
0
/api/0//api/0/organizations//api/0/organizations/:org//api/0/organizations/:org/eventids/:event//api/0/organizations/:org/events//api/0/organizations/:org/issues//api/0/organizations/:org/issues//api/0/organizations/:org/issues/:issue//api/0/organizations/:org/issues/:issue//api/0/organizations/:org/issues/:issue//api/0/organizations/:org/issues/:issue/comments//api/0/organizations/:org/issues/:issue/comments//api/0/organizations/:org/issues/:issue/events//api/0/organizations/:org/issues/:issue/events/:event//api/0/organizations/:org/issues/:issue/tags/:key//api/0/organizations/:org/issues/:issue/tags/:key/values//api/0/organizations/:org/members//api/0/organizations/:org/projects//api/0/organizations/:org/releases//api/0/organizations/:org/releases//api/0/organizations/:org/releases/:version//api/0/organizations/:org/releases/:version//api/0/organizations/:org/releases/:version/deploys//api/0/organizations/:org/releases/:version/deploys//api/0/organizations/:org/shortids/:short//api/0/organizations/:org/teams//api/0/projects/:org/:project//api/0/projects/:org/:project/events//api/0/projects/:org/:project/events/:event//api/0/projects/:org/:project/issues//api/0/projects/:org/:project/keys//api/0/projects/:org/:project/releases/Seed your own data
The data the Sentry mock starts with on every run, cut to a few records. ancha twins seed sentry prints every field.
Full seed YAML
twins:
- sentry
seed:
sentry:
organization:
slug: acme
name: Acme
created: -17520h
me: ancha
members:
- ref: ancha
name: Ancha assistant
email: ancha@acme.example
teams:
- backend
joined: -700h
- ref: rachel
name: Rachel Moore
email: rachel@acme.example
role: admin
teams:
- backend
joined: -12000h
teams:
- slug: backend
name: Backend
created: -17000h
projects:
- slug: orders-api
name: Orders API
teams:
- backend
created: -16000h
issue_counter: 139
releases:
- version: orders@4.11.0
projects:
- orders-api
created: -300h
deploys:
- environment: production
at: -299h
issues:
- ref: orders_pool
project: orders-api
type: KnexTimeoutError
value: "Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?"
culprit: POST /orders
request:
method: POST
url: https://api.acme.example/orders
stacktrace:
- filename: node_modules/knex/lib/client.js
function: Client.acquireConnection
line: 312
code: const connection = await this.pool.acquire().promise;
in_app: false
events:
- at: -2h51m
count: 38
every: 30s
users:
- ridgeway-robotics
tags:
server_name: orders-api-7d9f8
changes:
- at: -3h
by: rachel
assign: rachel
comments:
- author: rachel
at: -2h44m
text: Worker concurrency in 4.12.1 exhausted the database pool. Rolled back to 4.12.0; resolving.
Check what your agent did
Checks YAML
checks:
- id: release_created
trace:
called: POST /api/0/organizations/*/releases/More on-call tools
All 43 toolsSentry API mock FAQ
How can I check that an incident agent resolved a Sentry issue?
Send PUT / with status: resolved to Ancha’s Sentry mock. The mock saves the resolved status and a set_resolved activity entry, which appears when the issue is retrieved.
Where can an agent read the latest Sentry error’s stack trace?
Request / from the mock. For an event seeded with exception frames, the response contains an exception entry whose data.values includes stacktrace.frames.
Can a Sentry triage agent assign an issue to a team by its slug?
Set assignedTo to #<team-slug> on the mock’s issue update request. The mock resolves the seeded team, saves the assignment and records an assigned activity when the assignee changes.
Install the CLI and run your agent against the Sentry mock.
Ancha is not affiliated with Sentry.