Skip to content

Apply the crash limits to crash reports of bulk users - #188

Open
turtledreams wants to merge 3 commits into
stagingfrom
bulk-crash-limits
Open

turtledreams wants to merge 3 commits into
stagingfrom
bulk-crash-limits

Conversation

@turtledreams

Copy link
Copy Markdown
Contributor

Builds on #187: the first two commits are the ones from #187, so #187 merges first.

Crash reports of bulk users now keep to the crash limits. report_crash queued the report as given, so none of the limits applied.

  • _error keeps to the stack trace limits of the SDK development guide: threads are separated by blank lines, at most 50 threads of max_stack_trace_lines_per_thread lines of max_stack_trace_line_length characters, and at most 20,000 characters in all. A native crash dump (_native_cpp: true) is sent whole, as the guide says. A stack trace within the limits is sent unchanged.
  • _logs keeps the newest max_breadcrumb_count breadcrumbs, each cut to max_value_size characters.
  • _custom keeps to the key, value and segmentation limits.
  • The report given to report_crash is copied, not changed. The stack trace limits are in cc.truncateStackTrace so that other callers can share them.

Tests in test/tests_bulk_fixes.js cover the set limits, a native dump next to the same text in a JavaScript crash, and the default limits (threads, lines, total length, breadcrumbs); they fail without the fix. npm test passes locally (256 tests).

report_trace cut trace.app_metrics, while traces carry apm_metrics, so
custom metrics were never limited. Custom metrics now keep to the key,
value and segmentation limits, and the reserved metrics that the server
reads, such as duration and response_time, are sent whole. A trace
without metrics is still refused, and a refused bulk trace returns the
bulk user for chaining.
report_app_start put the duration under app_metrics, so report_trace
refused the trace and nothing was sent. Its start time was also the
process uptime instead of a timestamp. It now sends the "app_start"
trace from the process start until the call, as the APM guide names it.
report_crash queued the crash report as given. The stack trace now keeps
to the stack trace limits per thread, at most 50 threads and 20,000
characters, unless it is a native crash dump. The newest breadcrumbs are
kept, each cut to the value limit, and the crash segmentation keeps to
the key, value and segmentation limits. The given report is not changed.
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

CI report

Check Result Summary
CodeQL ✅ passed
Node.js CI ✅ passed
Public API changelog ✅ passed
Public API changes ✅ passed Public API: No public API change
Public API changes: Public API, No public API change

No public API change.

For 019b6d3, updated 2026-11-17 09:56 UTC. Each check's run page has its full log.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant