본문으로 건너뛰기

오류 추적

오류 추적은 페이지가 던진 오류를 이벤트로 수집하고, 원인이 같은 오류를 하나의 이슈로 묶어, 각 이슈가 얼마나 자주, 몇 명에게, 어느 세션에서 발생했는지 보여 줍니다. 수집은 클라이언트별 옵트인이며, 예외는 모든 요금제에서 이벤트로 계산됩니다.

At a glance

Enable
createWebClient({ errorTracking: true })
Event
$exception, an ordinary event
Grouping
By type and stack at ingest, never by line number
Statuses
open, resolved, archived, suppressed
Read
errorIssues, errorIssue over GraphQL, REST and MCP
Plan
Every plan; an exception counts as an event
  • 잡히지 않은 오류와 처리되지 않은 거부는 자동으로 수집되며, captureException은 코드가 잡은 오류를 보냅니다.
  • 오류는 도착할 때 유형과 스택으로 묶이며 줄 번호로는 절대 묶이지 않으므로, 배포 후에도 같은 이슈로 남습니다.
  • 이슈를 해결, 보관, 억제하거나 담당자에게 지정할 수 있으며, 해결된 이슈는 오류가 다시 발생하면 다시 열립니다.

작동 방식

With errorTracking on, the web SDK listens for the page’s uncaught errors and unhandled promise rejections and sends each as a $exception event with $exception_handled: false. captureException sends an error your own code caught, as handled. The event travels the path every event travels, so a trend, a funnel, a cohort, an event stream and the warehouse all see it, and it carries the session it happened in.

As the event arrives, the platform works out which issue it belongs to and writes that as $exception_fingerprint. Whatever a sender put under that name is replaced: a page cannot choose its issue. The first exception of a fingerprint opens an issue; every later one moves when the issue was last seen.

What an exception carries

An exception carries its type ($exception_type), its message ($exception_message, 1,000 characters at most), its stack as frames ($exception_frames, 50 at most, each a function, a file, a line and a column) and the page it happened on. A file’s address is recorded without its fragment, without a name and password, and with every query value replaced by [redacted].

An error’s message is whatever the page’s code wrote and can hold a person’s details, which is why capture is off until you turn it on. To drop or scrub a property before it is stored, use a transformation on $exception.

How errors are grouped

Two exceptions are one issue when they have the same type and the same five innermost frames, each read as its function and its file. A file is read without its host and without any build hash in its path, and a frame’s line and column are never read, so the same error is the same issue before and after a deploy. An exception with no stack is grouped by its type and its message with every number replaced, so Order 1042 failed and Order 1043 failed are one issue.

Statuses

StatusWhat it meansWhen the error happens again
<code>open</code>Nobody has dealt with it yet, or it came back after being resolved (<code>regressedAt</code> says when)It stays open
<code>resolved</code>Fixed, by the member it names, at the time it namesIt is reopened and marked as regressed, with the time
<code>archived</code>Known and not worth fixingIt stays archived
<code>suppressed</code>NoiseThe exception is dropped as it arrives: not stored, not counted against the events allowance

An issue can be assigned to one member of the company. When that member leaves, the issue still names them and reads as unassigned in every filter. Reading issues takes prodantix.errors.read, which every member holds; changing a status or an assignee takes prodantix.errors.manage, which Owner and Admin hold and a custom role can be given.

Reading an issue

errorIssues lists a project’s issues, the one seen most recently first, each with how often it happened (occurrences) and to how many people (people) in the range you ask for, or in everything stored. It filters by status (regressed keeps the open issues that came back after being resolved), by one member (memberSub) or the unassigned ones (unassigned), and by a search over the type and the message, 50 a page and 200 at most. The counts are read from the events themselves, so they never drift from what a trend of $exception shows. errorIssueCounts answers how many issues each status holds under the same filters.

errorIssuesInSession answers the issues whose errors happened in one session, the one seen most recently first. It is how a recording’s console errors open their issue: give it the session id a replay carries.

errorIssue answers one issue with its occurrences on each day (the range you ask for, a year at most, or the thirty days to now) and the sessions it happened in, newest first and fifty at most. Each session says whether its recording still exists (hasRecording) and how far into it the error first happens (watchAtMs), so a list never offers a replay that was not made or has expired. errorIssueChanges tells a list when an issue opens, regresses, changes status or changes hands.

GraphQL
query OpenIssues($projectId: String!) {
  errorIssues(projectId: $projectId, status: "open", limit: 20) {
    id
    type
    message
    lastSeen
    occurrences
    people
    assigneeName
  }
}

접근 위치

SurfaceOperation
RESTGET /v1/projects/{projectId}/error-issues, GET .../error-issue-counts, GET .../sessions/{sessionId}/error-issues, GET .../error-issues/{issueId}, PUT .../error-issues/{issueId}/status, PUT .../error-issues/{issueId}/assignee
GraphQLerrorIssues, errorIssueCounts, errorIssuesInSession, errorIssue queries; setErrorIssueStatus, assignErrorIssue mutations; errorIssueChanges subscription
RealtimeerrorIssueChange in the project room
MCPprodantix.errors.issues, prodantix.errors.counts, prodantix.errors.session_issues, prodantix.errors.issue, prodantix.errors.set_status, prodantix.errors.assign

예시

TypeScript
import { captureException, createWebClient } from '@prodantix/sdk/web';

const prodantix = createWebClient({
  apiKey: process.env.PRODANTIX_KEY,
  errorTracking: true,
});

try {
  await submitOrder(cart);
} catch (error) {
  // An error your code caught is sent as handled, with what you add to it.
  captureException(prodantix, error, { cart_size: cart.items.length });
  throw error;
}

Capture ships in the web SDK from version 0.14.0. The server, Flutter and Python SDKs do not capture errors yet.