From 7f6d9fa6450d411abd556be91454dca5dcb9e392 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Fri, 20 Dec 2024 16:38:21 +0100 Subject: [PATCH 1/3] feat(browser)!: Remove `captureUserFeedback` method --- .../init.js | 0 .../simple_feedback/subject.js | 2 +- .../simple_feedback/test.ts | 0 .../withCaptureException/init.js | 2 +- .../withCaptureException/subject.js | 0 .../withCaptureException/test.ts | 0 .../withCaptureMessage/init.js | 2 +- .../withCaptureMessage/subject.js | 0 .../withCaptureMessage/test.ts | 0 docs/migration/v8-to-v9.md | 4 +++ packages/browser/src/client.ts | 27 +------------------ packages/browser/src/exports.ts | 3 +-- packages/browser/src/sdk.ts | 16 +---------- 13 files changed, 10 insertions(+), 46 deletions(-) rename dev-packages/browser-integration-tests/suites/public-api/{captureUserFeedback => captureFeedback}/init.js (100%) rename dev-packages/browser-integration-tests/suites/public-api/{captureUserFeedback => captureFeedback}/simple_feedback/subject.js (78%) rename dev-packages/browser-integration-tests/suites/public-api/{captureUserFeedback => captureFeedback}/simple_feedback/test.ts (100%) rename dev-packages/browser-integration-tests/suites/public-api/{captureUserFeedback => captureFeedback}/withCaptureException/init.js (91%) rename dev-packages/browser-integration-tests/suites/public-api/{captureUserFeedback => captureFeedback}/withCaptureException/subject.js (100%) rename dev-packages/browser-integration-tests/suites/public-api/{captureUserFeedback => captureFeedback}/withCaptureException/test.ts (100%) rename dev-packages/browser-integration-tests/suites/public-api/{captureUserFeedback => captureFeedback}/withCaptureMessage/init.js (91%) rename dev-packages/browser-integration-tests/suites/public-api/{captureUserFeedback => captureFeedback}/withCaptureMessage/subject.js (100%) rename dev-packages/browser-integration-tests/suites/public-api/{captureUserFeedback => captureFeedback}/withCaptureMessage/test.ts (100%) diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/init.js b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/init.js similarity index 100% rename from dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/init.js rename to dev-packages/browser-integration-tests/suites/public-api/captureFeedback/init.js diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/subject.js similarity index 78% rename from dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/subject.js index 035199ab42f1..4869531b9b92 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/subject.js +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/subject.js @@ -1,4 +1,4 @@ -Sentry.captureUserFeedback({ +Sentry.captureFeedback({ eventId: 'test_event_id', email: 'test_email', comments: 'test_comments', diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts similarity index 100% rename from dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/simple_feedback/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/init.js b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/init.js similarity index 91% rename from dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/init.js rename to dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/init.js index 866263273351..f853dd14d730 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/init.js +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/init.js @@ -5,7 +5,7 @@ window.Sentry = Sentry; Sentry.init({ dsn: 'https://public@dsn.ingest.sentry.io/1337', beforeSend(event) { - Sentry.captureUserFeedback({ + Sentry.captureFeedback({ event_id: event.event_id, name: 'John Doe', email: 'john@doe.com', diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/subject.js similarity index 100% rename from dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/subject.js diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts similarity index 100% rename from dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureException/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/init.js b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/init.js similarity index 91% rename from dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/init.js rename to dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/init.js index 805d6adc2e1e..7d1a9b04bb73 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/init.js +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/init.js @@ -5,7 +5,7 @@ window.Sentry = Sentry; Sentry.init({ dsn: 'https://public@dsn.ingest.sentry.io/1337', beforeSend(event) { - Sentry.captureUserFeedback({ + Sentry.captureFeedback({ event_id: event.event_id, name: 'John Doe', email: 'john@doe.com', diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/subject.js similarity index 100% rename from dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/subject.js rename to dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/subject.js diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts similarity index 100% rename from dev-packages/browser-integration-tests/suites/public-api/captureUserFeedback/withCaptureMessage/test.ts rename to dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts diff --git a/docs/migration/v8-to-v9.md b/docs/migration/v8-to-v9.md index ae2f68bb0e38..7e5b411ac5e0 100644 --- a/docs/migration/v8-to-v9.md +++ b/docs/migration/v8-to-v9.md @@ -128,6 +128,10 @@ Sentry.init({ - The `urlEncode` method has been removed. There is no replacement. - The `getDomElement` method has been removed. There is no replacement. +### `@sentry/browser` + +- The `captureUserFeedback` method has been removed. Use `captureFeedback` instead as a drop-in replacement. + ### `@sentry/nestjs` - Removed `WithSentry` decorator. Use `SentryExceptionCaptured` instead. diff --git a/packages/browser/src/client.ts b/packages/browser/src/client.ts index 2ce5c7dfece6..c6945289284a 100644 --- a/packages/browser/src/client.ts +++ b/packages/browser/src/client.ts @@ -8,14 +8,11 @@ import type { ParameterizedString, Scope, SeverityLevel, - UserFeedback, } from '@sentry/core'; -import { BaseClient, applySdkMetadata, getSDKSource, logger } from '@sentry/core'; -import { DEBUG_BUILD } from './debug-build'; +import { BaseClient, applySdkMetadata, getSDKSource } from '@sentry/core'; import { eventFromException, eventFromMessage } from './eventbuilder'; import { WINDOW } from './helpers'; import type { BrowserTransportOptions } from './transports/types'; -import { createUserFeedbackEnvelope } from './userfeedback'; /** * Configuration options for the Sentry Browser SDK. @@ -105,28 +102,6 @@ export class BrowserClient extends BaseClient { return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace); } - /** - * Sends user feedback to Sentry. - * - * @deprecated Use `captureFeedback` instead. - */ - public captureUserFeedback(feedback: UserFeedback): void { - if (!this._isEnabled()) { - DEBUG_BUILD && logger.warn('SDK not enabled, will not capture user feedback.'); - return; - } - - const envelope = createUserFeedbackEnvelope(feedback, { - metadata: this.getSdkMetadata(), - dsn: this.getDsn(), - tunnel: this.getOptions().tunnel, - }); - - // sendEnvelope should not throw - // eslint-disable-next-line @typescript-eslint/no-floating-promises - this.sendEnvelope(envelope); - } - /** * @inheritDoc */ diff --git a/packages/browser/src/exports.ts b/packages/browser/src/exports.ts index 295e6daa36cc..f34bad9c5aa7 100644 --- a/packages/browser/src/exports.ts +++ b/packages/browser/src/exports.ts @@ -27,6 +27,7 @@ export { addIntegration, captureException, captureEvent, + captureFeedback, captureMessage, close, createTransport, @@ -92,8 +93,6 @@ export { init, onLoad, showReportDialog, - // eslint-disable-next-line deprecation/deprecation - captureUserFeedback, } from './sdk'; export { breadcrumbsIntegration } from './integrations/breadcrumbs'; diff --git a/packages/browser/src/sdk.ts b/packages/browser/src/sdk.ts index 425212015455..163e17b014d7 100644 --- a/packages/browser/src/sdk.ts +++ b/packages/browser/src/sdk.ts @@ -2,7 +2,6 @@ import { consoleSandbox, dedupeIntegration, functionToStringIntegration, - getClient, getCurrentScope, getIntegrationsToSetup, getReportDialogEndpoint, @@ -13,7 +12,7 @@ import { stackParserFromStackParserOptions, supportsFetch, } from '@sentry/core'; -import type { Client, DsnLike, Integration, Options, UserFeedback } from '@sentry/core'; +import type { Client, DsnLike, Integration, Options } from '@sentry/core'; import type { BrowserClientOptions, BrowserOptions } from './client'; import { BrowserClient } from './client'; import { DEBUG_BUILD } from './debug-build'; @@ -307,16 +306,3 @@ export function forceLoad(): void { export function onLoad(callback: () => void): void { callback(); } - -/** - * Captures user feedback and sends it to Sentry. - * - * @deprecated Use `captureFeedback` instead. - */ -export function captureUserFeedback(feedback: UserFeedback): void { - const client = getClient(); - if (client) { - // eslint-disable-next-line deprecation/deprecation - client.captureUserFeedback(feedback); - } -} From f048fffa19f4b91a74f47f3ef004a0287afb8f52 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Mon, 23 Dec 2024 10:45:07 +0100 Subject: [PATCH 2/3] Update browser integration tests for `captureFeedback` --- .../simple_feedback/subject.js | 2 +- .../captureFeedback/simple_feedback/test.ts | 17 ++++++++-------- .../withCaptureException/init.js | 4 ++-- .../withCaptureException/test.ts | 20 ++++++++++--------- .../withCaptureMessage/init.js | 4 ++-- .../withCaptureMessage/test.ts | 16 +++++++-------- 6 files changed, 33 insertions(+), 30 deletions(-) diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/subject.js b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/subject.js index 4869531b9b92..950b7701a043 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/subject.js +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/subject.js @@ -1,6 +1,6 @@ Sentry.captureFeedback({ eventId: 'test_event_id', email: 'test_email', - comments: 'test_comments', + message: 'test_comments', name: 'test_name', }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts index 3d1253910e3d..d14e6a488c72 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts @@ -1,5 +1,5 @@ import { expect } from '@playwright/test'; -import type { UserFeedback } from '@sentry/core'; +import type { FeedbackEvent } from '@sentry/core'; import { sentryTest } from '../../../../utils/fixtures'; import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; @@ -7,12 +7,13 @@ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers'; sentryTest('should capture simple user feedback', async ({ getLocalTestUrl, page }) => { const url = await getLocalTestUrl({ testDir: __dirname }); - const eventData = await getFirstSentryEnvelopeRequest(page, url); + const eventData = await getFirstSentryEnvelopeRequest(page, url); - expect(eventData).toMatchObject({ - eventId: 'test_event_id', - email: 'test_email', - comments: 'test_comments', - name: 'test_name', - }); + expect(eventData.contexts).toMatchObject(expect.objectContaining({ + feedback: { + contact_email: 'test_email', + message: 'test_comments', + name: 'test_name', + } + })) }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/init.js b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/init.js index f853dd14d730..099425cd3f2f 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/init.js +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/init.js @@ -6,10 +6,10 @@ Sentry.init({ dsn: 'https://public@dsn.ingest.sentry.io/1337', beforeSend(event) { Sentry.captureFeedback({ - event_id: event.event_id, + associatedEventId: event.event_id, name: 'John Doe', email: 'john@doe.com', - comments: 'This feedback should be attached associated with the captured error', + message: 'This feedback should be attached associated with the captured error', }); return event; }, diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts index aa7bc8f7aa17..d00b9cf9f9aa 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts @@ -1,5 +1,5 @@ import { expect } from '@playwright/test'; -import type { Event, UserFeedback } from '@sentry/core'; +import type { Event, FeedbackEvent } from '@sentry/core'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; @@ -7,17 +7,19 @@ import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; sentryTest('capture user feedback when captureException is called', async ({ getLocalTestUrl, page }) => { const url = await getLocalTestUrl({ testDir: __dirname }); - const data = (await getMultipleSentryEnvelopeRequests(page, 2, { url })) as (Event | UserFeedback)[]; + const data = (await getMultipleSentryEnvelopeRequests(page, 2, { url })) as (Event | FeedbackEvent)[]; expect(data).toHaveLength(2); const errorEvent = ('exception' in data[0] ? data[0] : data[1]) as Event; - const feedback = ('exception' in data[0] ? data[1] : data[0]) as UserFeedback; + const feedback = ('exception' in data[0] ? data[1] : data[0]) as FeedbackEvent; - expect(feedback).toEqual({ - comments: 'This feedback should be attached associated with the captured error', - email: 'john@doe.com', - event_id: errorEvent.event_id, - name: 'John Doe', - }); + expect(feedback.contexts).toEqual(expect.objectContaining({ + feedback: { + associated_event_id: errorEvent.event_id, + message: 'This feedback should be attached associated with the captured error', + contact_email: 'john@doe.com', + name: 'John Doe', + } + })); }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/init.js b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/init.js index 7d1a9b04bb73..b1cc371e5ec6 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/init.js +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/init.js @@ -6,10 +6,10 @@ Sentry.init({ dsn: 'https://public@dsn.ingest.sentry.io/1337', beforeSend(event) { Sentry.captureFeedback({ - event_id: event.event_id, + associatedEventId: event.event_id, name: 'John Doe', email: 'john@doe.com', - comments: 'This feedback should be attached associated with the captured message', + message: 'This feedback should be attached associated with the captured message', }); return event; }, diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts index 019a5d4a0326..3327956a326f 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts @@ -1,5 +1,5 @@ import { expect } from '@playwright/test'; -import type { Event, UserFeedback } from '@sentry/core'; +import type { Event, FeedbackEvent } from '@sentry/core'; import { sentryTest } from '../../../../utils/fixtures'; import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; @@ -7,17 +7,17 @@ import { getMultipleSentryEnvelopeRequests } from '../../../../utils/helpers'; sentryTest('capture user feedback when captureMessage is called', async ({ getLocalTestUrl, page }) => { const url = await getLocalTestUrl({ testDir: __dirname }); - const data = (await getMultipleSentryEnvelopeRequests(page, 2, { url })) as (Event | UserFeedback)[]; + const data = (await getMultipleSentryEnvelopeRequests(page, 2, { url })) as (Event | FeedbackEvent)[]; expect(data).toHaveLength(2); const errorEvent = ('exception' in data[0] ? data[0] : data[1]) as Event; - const feedback = ('exception' in data[0] ? data[1] : data[0]) as UserFeedback; + const feedback = ('exception' in data[0] ? data[1] : data[0]) as FeedbackEvent; - expect(feedback).toEqual({ - comments: 'This feedback should be attached associated with the captured message', - email: 'john@doe.com', - event_id: errorEvent.event_id, + expect(feedback.contexts).toEqual(expect.objectContaining({ + message: 'This feedback should be attached associated with the captured message', + contact_email: 'john@doe.com', + associated_event_id: errorEvent.event_id, name: 'John Doe', - }); + })); }); From 16c451b46df7a2f6f7da6356ca1c1dba16c3c27b Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Mon, 23 Dec 2024 10:50:58 +0100 Subject: [PATCH 3/3] Update migration guide for captureUserFeedback --- .../captureFeedback/simple_feedback/test.ts | 16 +++++++++------- .../withCaptureException/test.ts | 18 ++++++++++-------- .../captureFeedback/withCaptureMessage/test.ts | 16 ++++++++++------ docs/migration/v8-to-v9.md | 6 +++++- 4 files changed, 34 insertions(+), 22 deletions(-) diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts index d14e6a488c72..acf97eba586f 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/simple_feedback/test.ts @@ -9,11 +9,13 @@ sentryTest('should capture simple user feedback', async ({ getLocalTestUrl, page const eventData = await getFirstSentryEnvelopeRequest(page, url); - expect(eventData.contexts).toMatchObject(expect.objectContaining({ - feedback: { - contact_email: 'test_email', - message: 'test_comments', - name: 'test_name', - } - })) + expect(eventData.contexts).toMatchObject( + expect.objectContaining({ + feedback: { + contact_email: 'test_email', + message: 'test_comments', + name: 'test_name', + }, + }), + ); }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts index d00b9cf9f9aa..24a2664154f5 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureException/test.ts @@ -14,12 +14,14 @@ sentryTest('capture user feedback when captureException is called', async ({ get const errorEvent = ('exception' in data[0] ? data[0] : data[1]) as Event; const feedback = ('exception' in data[0] ? data[1] : data[0]) as FeedbackEvent; - expect(feedback.contexts).toEqual(expect.objectContaining({ - feedback: { - associated_event_id: errorEvent.event_id, - message: 'This feedback should be attached associated with the captured error', - contact_email: 'john@doe.com', - name: 'John Doe', - } - })); + expect(feedback.contexts).toEqual( + expect.objectContaining({ + feedback: { + associated_event_id: errorEvent.event_id, + message: 'This feedback should be attached associated with the captured error', + contact_email: 'john@doe.com', + name: 'John Doe', + }, + }), + ); }); diff --git a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts index 3327956a326f..2ae261759767 100644 --- a/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts +++ b/dev-packages/browser-integration-tests/suites/public-api/captureFeedback/withCaptureMessage/test.ts @@ -14,10 +14,14 @@ sentryTest('capture user feedback when captureMessage is called', async ({ getLo const errorEvent = ('exception' in data[0] ? data[0] : data[1]) as Event; const feedback = ('exception' in data[0] ? data[1] : data[0]) as FeedbackEvent; - expect(feedback.contexts).toEqual(expect.objectContaining({ - message: 'This feedback should be attached associated with the captured message', - contact_email: 'john@doe.com', - associated_event_id: errorEvent.event_id, - name: 'John Doe', - })); + expect(feedback.contexts).toEqual( + expect.objectContaining({ + feedback: { + message: 'This feedback should be attached associated with the captured message', + contact_email: 'john@doe.com', + associated_event_id: errorEvent.event_id, + name: 'John Doe', + }, + }), + ); }); diff --git a/docs/migration/v8-to-v9.md b/docs/migration/v8-to-v9.md index 7e5b411ac5e0..77f1607e9169 100644 --- a/docs/migration/v8-to-v9.md +++ b/docs/migration/v8-to-v9.md @@ -72,6 +72,10 @@ Sentry.init({ - When `skipOpenTelemetrySetup: true` is configured, `httpIntegration({ spans: false })` will be configured by default. This means that you no longer have to specify this yourself in this scenario. With this change, no spans are emitted once `skipOpenTelemetrySetup: true` is configured, without any further configuration being needed. +### `@sentry/browser` + +- The `captureUserFeedback` method has been removed. Use `captureFeedback` instead and update the `comments` field to `message`. + ### Uncategorized (TODO) TODO @@ -130,7 +134,7 @@ Sentry.init({ ### `@sentry/browser` -- The `captureUserFeedback` method has been removed. Use `captureFeedback` instead as a drop-in replacement. +- The `captureUserFeedback` method has been removed. Use `captureFeedback` instead and update the `comments` field to `message`. ### `@sentry/nestjs`