Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                

Error tracking

Stacktape error tracking is a built-in error inbox available on the Error tracking page of the Stacktape Console and in the CLI. It displays recorded runtime errors with each issue's status, error message, error type, occurrence count, function name, and originating project and stage. Manage issues without integrating a third-party error tracking service.

Use stacktape error list, error resolve, error ignore, and error reopen to manage recorded errors from the CLI. Configure capture with deploymentConfig.errorTracking. Each recorded error group is called an issue.

Migrating to v4

The issues:* commands are now error list, error ignore, error resolve, and error reopen. The old commands still work, so existing scripts and MCP command requests keep running. Rename deploymentConfig.issues to deploymentConfig.errorTracking in YAML and TypeScript configs; the old config name is rejected. Issue IDs and status values stay the same.

When to use

Stacktape error tracking gives you structured error tracking with no additional SDK or external service. With the Console, it is on by default. It fits when:

  • You want to see which runtime errors are recurring across projects and stages without scanning raw log lines.
  • You need a lightweight triage workflow — open, resolve, or ignore issues — without leaving Stacktape.
  • You want occurrence counts and error classification grouped per issue, not scattered across individual log entries.

Error tracking works well as a first line of error visibility. For most teams shipping APIs and background workers on Stacktape, it replaces the need for a separate error tracking tool during early and mid-stage development.

When NOT to use

Stacktape error tracking displays recorded runtime errors in the Console and CLI without requiring you to add an SDK to your application. It does not instrument your application process directly. If you need breadcrumbs, custom tags, user session tracking, release tracking, or performance profiling, use a dedicated APM tool like Sentry or Datadog alongside or instead of it. Error tracking is best for triaging recurring runtime failures — not for full-stack observability.

Turning error tracking off or limiting stages

With the Console, error tracking is on by default. Without the Console, error tracking defaults to off. Setting errorTracking.enabled: true or listing stages for enabled tracking stops the deploy with CONFIG_NEEDS_CONSOLE.

The stack's configuration decides. Turn error tracking off for a stack, or limit it to some stages, in deploymentConfig.errorTracking; the change takes effect at the stack's next deployment.

deploymentConfig:
  errorTracking:
    enabled: true                    # default; false turns error tracking off for this stack
    stages: [production, staging]    # omitted or empty means every stage

The Console has one organization-wide switch as well. Click Settings on the Error tracking page to open Error tracking settings; organization owners and admins can turn error tracking off and on there. While it is off, no error events are recorded for any stack. The same dialog lists the deployed stacks and whether their last successful deployment wired error tracking, so you can see which stacks still run an older CLI.

What reports errors

Error tracking reads your logs. A resource reports errors when it meets all of these:

  • The stack is deployed with the CLI signed in to the Stacktape Console.
  • Lambda functions are packaged with js-bundle, or with buildpack and a Python, Go, Java, .NET or Ruby entry file. Rust functions, edge functions and functions packaged as a custom-artifact or a container image don't report.
  • Containers of web, private and worker services and multi-container workloads are packaged with js-bundle. Containers built from a buildpack, a dockerfile or a prebuilt image don't report, and neither do batch jobs.
  • Its logging is on: no logging.disabled: true and no logging.logForwarding.
  • Its log group uses the Standard log class. With logging.logClass: infrequent-access, AWS does not support the required log subscription filters. Those logs remain available through bounded Logs Insights snapshots in the Console and CLI.

stacktape deploy prints whether error tracking is on for the stage and why, for example Error tracking: on (on by default). That line covers the stage. Which of its resources report follows from the list above.

How you get alerted

Errors reach your alert channels through incidents, and only from production stages. Whether a stage counts as production is set by its stage type.

  • A new error opens an incident, or joins an open one, and shows on the Incidents page. An incident that holds only new errors doesn't notify anyone.
  • The incident notifies your channels once the error reaches 20 occurrences, or when an error you resolved comes back. An error that joins an incident that already notifies, for example one opened by a firing alarm, notifies at once.
  • A muted incident doesn't notify. An incident opened during a deployment notifies only if it outlasts the deployment.
  • A channel receives these notifications through a notification rule with both Incident opened and Incident escalated. New channels start with one, except Slack channels marked for previews.

Errors from other stages still show on the Error tracking page and in stacktape error list. New and reopened issues also appear in alert history.

What leaves your AWS account

For each detected error, the detector running in your account sends the error message and type, the parsed stack frames, the matching log line, or for a multi-line stack trace the lines around it (4,000 characters at most), the request id and, for a Lambda function, the version its execution environment ran and the time that environment started. It also sends where the error happened (project, stage, region, function name and log group) and how many occurrences the report stands for. Logs themselves stay in your account.

Before sending, known shapes of sensitive text are masked: secrets and tokens (AWS keys, GitHub, Stripe, Slack and Google tokens, JWTs, private key blocks), values under sensitive key names such as password, token or authorization, credentials in URLs, email addresses (the domain stays), IP addresses, card numbers and user home directories in file paths. Masked text reads [redacted:email], [redacted:secret] and so on. The Console masks the same shapes again on arrival. Names, street addresses and phone numbers are not detected, because those patterns would also match ids and timestamps in log lines.

During an error storm the detector reports each distinct error once per log batch with its occurrence count, and the Console stores a few occurrence samples per issue per minute. Occurrence counts include every reported occurrence, also those without a stored sample. The detector reports at most 20 distinct errors per log batch and skips log lines older than ten minutes, so a large burst of different errors can be undercounted. Ignored issues stop counting. The Console keeps the newest 100 occurrence samples of each issue.

Stack traces of bundled JavaScript

A JavaScript or TypeScript function packaged with js-bundle runs minified code, so the frames the runtime logs point into the bundle (/var/task/index.js:1:4821). Its source maps are not in the deployment package: each deployment stores them in the stack's deployment bucket and tells the Console which maps describe the code each function runs from when.

When an issue is first seen, the Console reads the maps of the code that threw. It picks them by the version the failing execution environment ran, or, for $LATEST, by the time the environment started, so an error from an environment started before a later deployment, or from a version an alias still routes traffic to, gets the maps of its own code. It reads them through your connected account's role, limited for that session to the stack's source maps and the function's configuration and tags. The issue's detail page then shows the stack trace in your source files, with the original file, line and function.

The maps contain no source code. The Console stores the mapped file, line, column and function of each frame and keeps nothing else from the maps. Lambda logs in CloudWatch still show the bundled positions. To have Node.js map those as well, set keepSourceMapsInPackage; the Console then shows the frames as Node.js logged them.

Stack traces are mapped for errors from code deployed by the current CLI; errors from earlier deployments show the bundled positions.

Error types

The detector classifies each error. The Console shows the classification as a plain label on the issue's detail page, while the CLI prints the raw errorType value:

errorTypeConsole label
uncaughtUncaught exception
caughtLogged error
unhandled_rejectionUnhandled promise rejection
exit_errorProcess exited
handler_not_foundHandler not found
panicPanic

If an error type is not in this table, the Console also displays the raw errorType value. Use the label to recognize similar errors at a glance. The Console supports filtering by status, search text, project, and stage; the CLI error list command supports filtering by project name, stage, issue status, and result limit.

Issue statuses

Every issue has one of three statuses. The status filter on the Error tracking page shows the count for each:

StatusMeaning
OpenActive error that needs attention
ResolvedMarked as fixed. If the error happens again, the issue reopens. See How you get alerted for production notifications.
IgnoredWhile the issue is ignored, Stacktape skips new occurrences, and the issue doesn't open or join incidents. Reopen it to count them again.

The CLI has separate commands for resolving, ignoring, and reopening errors: error resolve, error ignore, and error reopen.

Viewing issues in the Console

The Error tracking page in the Stacktape Console provides a filterable, paginated view of all recorded issues across your organization. Open it from Observability → Error tracking in the Console sidebar. The status filter at the top shows how many issues are open, resolved and ignored.

Stacktape Console Error tracking page showing the status filter with Open, Resolved, Ignored and All counts, search, project and stage filters, and a table of open runtime errors with columns for error, events and last seen
The TypeError in the issue list

Issue table

Below the filters, a table lists issues with these columns:

ColumnShows
ErrorThe error message, with the project, stage, function name and, when known, the code location below it
EventsHow many times the error has occurred and when it started, for example "214 since 24m ago"
Last seenTime of the most recent occurrence
StatusOpen, Resolved or Ignored. Shown when the status filter is not Open.

Clicking a row navigates to the selected issue. If your role can manage errors, the menu at the end of a row resolves, ignores or reopens the issue.

Filtering

The Console provides four combinable filters that let you narrow the issue list:

  • Status — All, Open, Resolved, or Ignored. Defaults to Open so you see active errors first.
  • Search — Substring match against error messages. Useful for finding a specific exception type or message pattern.
  • Project — Narrow results to a single project.
  • Stage — Narrow results to a single stage. The dropdown includes stages from your deployed and undeployed projects plus stages found in existing issues.

The table shows as many rows as fit in the window and uses Last seen as the default sort column. Changing any filter resets to the first page.

Issue page

The issue's page shows:

  • the issue's status, for example Still happening or Came back, and a link to its open incident, if it has one;
  • the error message and stack trace, in your source files for bundled JavaScript when the maps match;
  • the failing request's CloudWatch logs. If the Console can't find or read them, for example because they expired or the log line has no request id, it shows the log line saved with the error;
  • the function that reported the error, the deploy that was live when it first appeared and the latest deploy since then;
  • links to the resource's failed traces and metrics around the error, and to other open errors on the same stage.
Stacktape Console issue page for a TypeError: it is still happening and part of an open incident, with the stack trace in source files, the log lines of the failing request, and the function and deployments in an About this error panel
The same TypeError with its stack trace and request logs

Managing issues from the CLI

The Stacktape CLI provides commands for working with issues. The error list command initializes the Stacktape API client with your configured API key. In agent mode, it prints raw JSON for programmatic use in CI/CD pipelines and AI coding assistants.

Listing issues

stacktape error list displays issues as a formatted table. The default limit is 25.

stacktape error list

Filter by project, stage, or status:

stacktape error list --project my-api --stage production --status OPEN

Set a custom limit:

stacktape error list --limit 50

In agent mode (used by AI coding assistants), the command outputs the raw listIssues response as JSON. The table view displays ID, status, error message, error type, function name, project, stage, occurrence count, and last seen.

Changing issue status

The CLI has separate commands for changing issue status:

Replace <issue-id> with the value from the ID column of stacktape error list:

stacktape error resolve <issue-id>

Error tracking vs logs vs alarms

Error tracking, logs, and alarms serve different observability purposes. See the dedicated pages for full details on each; the summary below highlights how they complement each other:

Error trackingLogsAlarms
PurposeTrack and triage runtime errorsView raw output from functions and workloadsAlert on metric thresholds
GroupingErrors grouped with occurrence countsIndividual log linesOne alarm per rule
Action modelResolve, ignore, or reopenSearch and filter via logsTriggers notifications
Best forError triage and regression trackingDebugging specific requestsProactive threshold monitoring

Error tracking complements alarms: alarms tell you something is wrong (high error rate, elevated latency), while issues tell you what specific errors are happening. Configure alert channels for alarm notifications, then use the Error tracking page to diagnose which errors are driving the spike.

Limitations

  • No in-process instrumentation. Stacktape error tracking does not use an in-process SDK. Errors that are silently swallowed, produce no output, or result in silent data corruption are not captured.
  • False positives possible. Log lines that match error patterns but aren't actual application errors (for example, error messages logged at info level for diagnostic purposes) may be recorded as issues. Review unexpected entries before acting on them.

Error tracking FAQ

How do I turn error tracking off for a stack?

Set deploymentConfig.errorTracking.enabled: false in the stack's configuration and deploy. To keep only some stages, list them in deploymentConfig.errorTracking.stages. Organization owners and admins can also turn error tracking off for every stack at once in Error tracking settings (the Settings button on the Error tracking page).

Why aren't my issues showing up?

The log subscriptions that report errors are added during deployment, so a stack reports only after it has been deployed with Stacktape v4. Check whether the resource can report errors; stacktape deploy prints whether error tracking is on for the stage and why. Open Error tracking settings with the Settings button on the Error tracking page: it lists each deployed stack and whether its last deployment wired error tracking. Also check that the organization switch is on.

Does issue monitoring add cost?

Very little. The detector is a Lambda function in your account that runs only when a log line matches an error pattern, and it reports each distinct error once per log batch. Stacktape does not charge per error. See Managing Costs for broader cost guidance across Stacktape features.

How is Stacktape error tracking different from Sentry or Datadog?

Stacktape error tracking is built in and does not require adding a Sentry or Bugsnag SDK to your application. Because it does not use in-process instrumentation, it provides less context than a dedicated APM tool — no breadcrumbs, no custom tags, no user session tracking, no performance traces. It also can't capture errors that are silently swallowed or produce no log output. Use error tracking for straightforward error triage; consider a dedicated APM tool if you need deep debugging context, release tracking, or performance monitoring.

What happens to existing issues when I disable monitoring?

Existing issues remain visible in the Console after monitoring is turned off — they are not deleted. You can still filter and search them; only the capture of new issues stops.

When should I use issues vs alarms for error monitoring?

Use both — they answer different questions. Alarms fire when a metric crosses a threshold (e.g., error rate above 5%), telling you something is wrong. Error tracking tells you what specific errors are happening and how often. Set up alarms with alert channels for real-time notification, then use the Error tracking page to identify which errors caused the spike and decide how to fix them.