Errors & Issues

GoodLogs groups raw exceptions into Issues using a fingerprint. Each issue tracks how many times it was seen, on which releases, by how many users, and whether it has been resolved.

Automatic error capture

When useEnvelope: true is set, the browser SDK automatically captures:

  • window.onerror (uncaught exceptions)
  • unhandledrejection (unhandled promise rejections)

These become captureException(...) calls tagged with source: window.onerror / source: unhandledRejection, inheriting the active navigation transaction's trace_id so they appear correctly in the trace waterfall. No additional setup needed.

Capture an exception

Browser / Node (@aj-2000-test/goodlogs-sdk)

typescript
import { GoodLogs } from "@aj-2000-test/goodlogs-sdk"

const gl = new GoodLogs({
  apiKey: "gl_pk_...",
  useEnvelope: true,
  release: "v1.4.2",
  environment: "production",
})

try {
  await chargeCard()
} catch (e) {
  gl.captureException(e, {
    tags: { feature: "checkout" },
    fingerprint: ["payment-flow"], // optional explicit grouping
  })
}

// Freeform message — useful for "shouldn't happen" branches.
gl.captureMessage("hit unreachable branch", { level: "warning" })

Python

python
import goodlogs

gl = goodlogs.GoodLogs(
    "gl_sk_...",
    use_envelope=True,
    release="v1.4.2",
    environment="production",
)

try:
    charge_card()
except Exception as e:
    gl.capture_exception(e, tags={"feature": "checkout"})

capture_exception walks __traceback__ (newest frame first) and marks frames outside site-packages / dist-packages as in_app. __cause__ / __context__ chained exceptions are captured into extra.chain.

Breadcrumbs are a rolling trail (max 50) of timestamped events that ride along with the next captured exception. Useful for "what was happening just before the crash".

typescript
gl.addBreadcrumb({ category: "ui.click", message: "Buy" })
gl.addBreadcrumb({ category: "fetch", message: "GET /api/cart" })
// ...later...
gl.captureException(err) // breadcrumbs above are attached automatically
python
gl.add_breadcrumb(category="ui.click", message="Buy")
gl.add_breadcrumb(category="fetch", message="GET /api/cart")
gl.capture_exception(err)

Fingerprinting

GoodLogs groups errors by hashing (exception_type, top non-vendor frame's function, top non-vendor frame's filename). The SDKs also let you override the fingerprint:

typescript
gl.captureException(e, { fingerprint: ["payment-flow", "checkout"] })

Two errors with the same fingerprint become one Issue — event_count goes up instead of creating duplicates.

Issue lifecycle

StatusMeaning
unresolvedDefault for a new fingerprint
resolvedMarked done from the dashboard
ignoredHidden from the default list
regressedA resolved issue seen again on a different release than the one it was resolved in

The dashboard /dashboard/issues/<id> page lets you flip status with one click and shows recent events with their full stack trace, breadcrumbs trail, and a link to the matching trace waterfall when a trace_id is present.

Auto-issues from logs

If you don't (or can't) install the SDK error API, GoodLogs still synthesises Issues for you. A background scanner runs every 60 seconds and:

  • finds logs with severity in ('error', 'fatal') in the last hour,
  • best-effort parses Python tracebacks and V8 stack traces out of the message body,
  • fingerprints + persists exactly like a real captureException.

These appear with extra.synthetic = 'logs' on the underlying error row so you can distinguish them in GQL (from:errors extra.synthetic:logs).

Querying in GQL

gql
from:issues status:unresolved | last:7d
from:issues status:regressed | count by release_last | last:30d
from:errors fingerprint_hash:abc1234 | last:24h
from:errors level:fatal | count by release | last:7d

REST actions (mutations only — reads go through GQL)

bash
POST /api/orgs/<org>/projects/<project>/issues/<id>/resolve   { "release": "v1.4.2" }
POST /api/orgs/<org>/projects/<project>/issues/<id>/ignore
POST /api/orgs/<org>/projects/<project>/issues/<id>/unresolve

Coming soon: source-map upload CLI + symbolication, so minified browser stack traces show original (file, line, col).