fix(pre-init): put unresolved method path on stackTrace - #1297
Conversation
Keep the error message low-cardinality for monitors, and forward err.stack so Datadog can show which queued method failed to resolve. Also separate "method not found" from "resolved method threw".
PR SummaryLow Risk Overview Identity request error reporting now includes Jest coverage was expanded for stack content, resolved-vs-unresolved failures, and non-function properties treated as unresolved. Reviewed by Cursor Bugbot for commit ac53dd8. Bugbot is set up for automated code reviews on this repo. Configure here. |
|



Summary
stack(e.g.mParticle pre-init method not found: Identity.login) and forward it viastackTracefromidentityApiClientso Datadog can query it.Unable to compute proper mParticle function - method not found) so existing monitors still match the shared prefix..applyshape.Why
~947k of the recent
IDENTITY_REQUEST/Unable to compute proper mParticle functionerrors were single-wrap failures where Datadog could not show which queued method failed (StackTrace: null, no method in the message). Partner investigation (Wingstop) showed the high-volume case was largely the pre-2.73.0 item-mutation bug reading an argument as the method name — but without a method path on the report we could not confirm that from telemetry alone.Test plan
error.stacknpm run lint@errorInfo.StackTrace(or equivalent) containsmParticle pre-init method not found: <path>for unresolved methodsUnable to compute proper mParticle functionstill match the new- method not foundsuffix