From 46f8c33024f377e2b0d482db891c77c401d12cf7 Mon Sep 17 00:00:00 2001 From: David Newell Date: Tue, 5 Nov 2024 10:50:45 +0100 Subject: [PATCH 1/2] chore: add stack type (#1511) * chore: add stack type * fix typing --- src/extensions/exception-autocapture/error-conversion.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/extensions/exception-autocapture/error-conversion.ts b/src/extensions/exception-autocapture/error-conversion.ts index 4c92a6d93..b1c05612d 100644 --- a/src/extensions/exception-autocapture/error-conversion.ts +++ b/src/extensions/exception-autocapture/error-conversion.ts @@ -42,6 +42,7 @@ export interface Exception { thread_id?: number stacktrace?: { frames?: StackFrame[] + type: 'raw' } } @@ -108,6 +109,7 @@ function errorPropertiesFromError(error: Error, metadata?: ErrorMetadata): Error value: exceptionMessage, stacktrace: { frames, + type: 'raw', }, mechanism: { handled, @@ -162,7 +164,7 @@ function errorPropertiesFromString(candidate: string, metadata?: ErrorMetadata): // so that it does not appear in a users stack trace const frames = parseStackFrames(metadata.syntheticException, 1) if (frames.length) { - exception.stacktrace = { frames } + exception.stacktrace = { frames, type: 'raw' } } } @@ -231,7 +233,7 @@ function errorPropertiesFromObject(candidate: Record, metadata? // so that it does not appear in a users stack trace const frames = parseStackFrames(metadata?.syntheticException, 1) if (frames.length) { - exception.stacktrace = { frames } + exception.stacktrace = { frames, type: 'raw' } } } From 921f5cfbfb0b33c1f862e81f99e0763d08ee69af Mon Sep 17 00:00:00 2001 From: oliverb123 Date: Tue, 5 Nov 2024 09:51:20 +0000 Subject: [PATCH 2/2] chore: Bump version to 1.181.0 --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56e0eb376..f89305264 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.181.0 - 2024-11-05 + +- chore: add stack type (#1511) + ## 1.180.1 - 2024-11-01 - fix: dead click fixes from watching in prod (#1508) diff --git a/package.json b/package.json index 5cd394f28..e672e22ae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "posthog-js", - "version": "1.180.1", + "version": "1.181.0", "description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", "repository": "https://github.com/PostHog/posthog-js", "author": "hey@posthog.com",