Instrumenting an app · 3 min read · Updated 2026-09-22
The operating model
Done is not more calls. It is a short checklist, a naming page in the repo, and a weekly hour on the money route.
Part 8 of 8
The checkout in chapter 6 is a finished design. Teams still fail after that, usually in operations: tracing on in development and off in production, a second analytics tool “just for marketing,” minLevel left at debug, no one named the events, no one owns the funnel. This chapter is the practice around the calls.
The checklist
Run this when you add a project, and again after every quarter.
- One project for the storefront and the API that must join — or two projects only when the teams and the inboxes truly split. This example uses one so
traceparentis enough. - API keys scoped for the signals you send. Default app keys include
eventsWrite,spansWrite,replaysWrite, andanalyticsWrite. Do not paste a key into a public repo; the browser key is still a project key. - Analytics enabled in Project settings only when you intend to collect, then
optIn()behind consent. Privacy and consent. - Tracing on in Project settings, staging first, then production. The traces sample rate is the one you can say out loud (default 10% success; errors always). Sampling and metering.
minLevelatwarningorerrorin production. Named loggers for the one module that must be louder.- Same
releasestring on every process you ship together. Release health is otherwise fiction. - Replay: keep the error-triggered default until you have a reason and a budget to retain more.
- Two alert rules before you call it done: new/reopened issues, and a RED threshold on the money route. Alerts.
- A funnel on the core action — three events minimum — with a name someone else will understand in six months.
Write the names down
Put a page in the repo. Not a wiki novel. A table of event names, transaction names, and the two or three tags you allow. A checkout fits on one screen:
| Name | Where | Properties / notes |
|---|---|---|
$pageview | Browser router | Automatic page context + UTM |
product_viewed | Product page | sku, price — not on hover |
add_to_cart | Cart button | sku, price, size |
checkout_started | Form mount (once) | value, currency |
checkout_failed | Catch / API | reason — never the stack |
order_completed | API after charge | order_id, value; forward anonymousId |
POST /checkout | API middleware | Do not put the cart id in the name |
payments.stripe.charge | Manual span | peer.service=stripe |
A pull request that adds track('Click') without updating this page is incomplete. Typos become new event names; there is no server-side rename.
A weekly hour
- Issues — anything new or reopened in production. Resolve what shipped. Ignore the rest on purpose.
- Performance — p95 and error rate on the money route. Open one slow waterfall. If N+1 showed up, it is a ticket, not a mystery.
- Analytics — the core funnel. If a step’s drop-off moved, pick three people and walk the incident loop once.
- Volume — accepted events and retained replays against the plan. A sudden info-event spike is a bad logger, not growth.
Definition of done
A team is done instrumenting a surface when:
- The decision table in chapter 2 has been applied to the new code, and leftover info events were deleted.
- The core action has three analytics events and a funnel, with server-side completion where the browser can lie.
- The money route is a named transaction with the children you would actually read.
- A staging throw produces one issue with View trace (and View replay on the web).
- Two alerts exist,
releasematches the deploy, and the naming page is in the repo.
That is a finished Talaria setup. It is smaller than most teams expect. The course exists so you do not make it larger.
Related guides
Instrumenting an app · 5 min
Instrumenting an appFour signals, one checkout, and a rule for every line of application code: capture, span, track, breadcrumb — or leave it alone.
Signals · 3 min
Sampling you can explainKeep every failing transaction. Sample a tenth of the rest. Bill the root, not every query. That is the whole policy.
Product analytics · 4 min
Privacy and consentAnalytics is the part of observability most likely to end up in a privacy review. Here is exactly what Talaria stores, and what it refuses to.
Triage loop · 3 min
Performance alerts and AI on tracesAlerts notice when RED crosses a line you set. Dashboard AI reads the issue, the replay, and the trace. Your coding agent uses MCP for the same evidence in the IDE.