Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(browser-integration-test): Add tests to check trace lifetime in user feedback events #11626

Closed

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Apr 16, 2024

WIP: These tests depend on #11428. Currently, feedback events have no trace context at all, so these tests fail.

Once #11428 is merged, we can/should also test programatically calling captureFeedback.

ref #11599

Copy link
Contributor

github-actions bot commented Apr 16, 2024

size-limit report 📦

Path Size
@sentry/browser 21.67 KB (-2.23% 🔽)
@sentry/browser (incl. Tracing) 31.28 KB (-1.55% 🔽)
@sentry/browser (incl. Tracing, Replay) 66.59 KB (-0.73% 🔽)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 59.99 KB (-0.84% 🔽)
@sentry/browser (incl. Tracing, Replay with Canvas) 70.43 KB (-0.67% 🔽)
@sentry/browser (incl. Tracing, Replay, Feedback) 80.28 KB (-0.64% 🔽)
@sentry/browser (incl. Feedback) 35.24 KB (-1.31% 🔽)
@sentry/browser (incl. Feedback, Feedback Modal) 35.25 KB (-1.31% 🔽)
@sentry/browser (incl. Feedback, Feedback Modal, Feedback Screenshot) 37.27 KB (-1.24% 🔽)
@sentry/browser (incl. sendFeedback) 26.46 KB (-1.81% 🔽)
@sentry/react 24.35 KB (-1.97% 🔽)
@sentry/react (incl. Tracing) 34.17 KB (-1.41% 🔽)
@sentry/vue 25.2 KB (-2.04% 🔽)
@sentry/vue (incl. Tracing) 32.99 KB (-1.45% 🔽)
@sentry/svelte 21.79 KB (-2.22% 🔽)
CDN Bundle 24.03 KB (-1.82% 🔽)
CDN Bundle (incl. Tracing) 32.58 KB (-1.26% 🔽)
CDN Bundle (incl. Tracing, Replay) 66.22 KB (-0.57% 🔽)
CDN Bundle (incl. Tracing, Replay, Feedback) 82.4 KB (-0.49% 🔽)
CDN Bundle - uncompressed 70.86 KB (-2.79% 🔽)
CDN Bundle (incl. Tracing) - uncompressed 96.98 KB (-2.06% 🔽)
CDN Bundle (incl. Tracing, Replay) - uncompressed 206.64 KB (-0.98% 🔽)
@sentry/nextjs (client) 33.51 KB (-1.51% 🔽)
@sentry/sveltekit (client) 31.77 KB (-1.53% 🔽)
@sentry/node 124.21 KB (-0.36% 🔽)

Base automatically changed from lms/test-browser-trace-lifetime-xhr to develop April 16, 2024 14:37
@Lms24 Lms24 force-pushed the lms/test-browser-userFeedback-modal-trace-lifetime branch from 32c55db to cdbcdc0 Compare April 16, 2024 14:42
mydea added a commit that referenced this pull request May 3, 2024
This PR adds a new `captureFeedback` method which is exported from all
SDKs.

This method can be used to capture a (new) user feedback from any
package.

We follow the same semantics as for other capture methods like
`captureException()` or `captureMessage()`: The method returns a string,
which is the event id. We do not wait for sending to be successful or
not, we just try to send it and return. You can both set an
`associatedEventId` (which replaces the event_id of the "old"
`captureUserFeedback`), and also pass attachments to send along (which
for now are sent as a separate envelope).

For usage in the modal UI, there is still `sendFeedback` which continues
to return a promise that resolves with the event ID, or rejects with a
meaningful error message if sending fails.

This also deprecates `captureUserFeedback()`, which is only exported in
browser. We cannot remove this yet because `captureFeedback` will only
work on newer self-hosted instances, so not all users can easily update.
We can/should remove this in v9.

Includes #11626
Fixes 49946
@Lms24
Copy link
Member Author

Lms24 commented May 3, 2024

Closing, these tests were added in #11428

@Lms24 Lms24 closed this May 3, 2024
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.

None yet

1 participant