Skip to content

feat(feedback): use custom prepare/send, re-use createEventEnvelope from core #9432

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

Merged
merged 11 commits into from
Nov 8, 2023

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented Nov 1, 2023

Remove the use of our temporary ingest endpoint, and use our normal ingestion instead.

@billyvg billyvg changed the base branch from develop to feat-feedback-implement-widget-api November 1, 2023 20:20
@billyvg billyvg force-pushed the feat-feedback-use-envelopes branch from e274114 to 7543baf Compare November 1, 2023 20:21
@billyvg billyvg changed the title wip: initial widget api feat: use custom prepare/send, re-use createEventEnvelope from core Nov 1, 2023
Copy link
Member Author

@billyvg billyvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're reviewing, I'd suggesting viewing the diff between the last 2 diffs as they are 2 diff implementations: client.captureEvent vs a custom capture.

Comment on lines 34 to 38
return client.captureEvent(
baseEvent,
{
event_id: uuid4(),
},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the trade offs for using captureEvent @mydea? We haven't really talked about any hooks that would be needed, but could be a possibility down the road. This would save us from having a lot of custom code, but I don't know how to find out if captureEvent fails so that we can show the user an error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the core thing is for it to go through event processors etc. Which we have to think about if we want this even 🤔

Copy link
Contributor

github-actions bot commented Nov 1, 2023

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 65.25 KB (+0.01% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 55.49 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 30.98 KB (+0.03% 🔺)
@sentry/browser - Webpack (gzipped) 21.3 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 61.83 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 29.1 KB (+0.04% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 21.24 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 194.91 KB (+0.02% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 88.32 KB (+0.03% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 63.3 KB (+0.04% 🔺)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 31.81 KB (+0.03% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 65.61 KB (+0.01% 🔺)
@sentry/react - Webpack (gzipped) 21.34 KB (+0.03% 🔺)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 82.35 KB (+0.01% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 48.13 KB (+0.02% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 15.98 KB (+1.06% 🔺)

@billyvg billyvg force-pushed the feat-feedback-implement-widget-api branch from 9c4c7cc to cc43a04 Compare November 6, 2023 18:11
Base automatically changed from feat-feedback-implement-widget-api to develop November 6, 2023 22:23
@billyvg billyvg force-pushed the feat-feedback-use-envelopes branch from 7543baf to 1a49823 Compare November 6, 2023 22:36
@billyvg billyvg marked this pull request as ready for review November 7, 2023 01:28
@billyvg billyvg requested a review from mydea November 7, 2023 01:28
@billyvg billyvg force-pushed the feat-feedback-use-envelopes branch from f88ddde to 380d8fe Compare November 7, 2023 20:45
@@ -4,6 +4,7 @@ export type { OfflineStore, OfflineTransportOptions } from './transports/offline
export type { ServerRuntimeClientOptions } from './server-runtime-client';

export * from './tracing';
export { createEventEnvelope } from './envelope';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we good to export this @mydea?

This also means we'll have to wait for an SDK release before we can release a new version of the SDK

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine by me! 👍

Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schema etc. looks good to me. only other thought is i'm wondering if the feedback context should set some kind of signifier that it's the "widget". maybe referrer:widget or feedback_source:widget?

thinking we can do the same for crash report, e.g. feedback_source:crash_report

@billyvg billyvg changed the title feat: use custom prepare/send, re-use createEventEnvelope from core feat(feedback): use custom prepare/send, re-use createEventEnvelope from core Nov 8, 2023
@billyvg billyvg merged commit 2fc6632 into develop Nov 8, 2023
@billyvg billyvg deleted the feat-feedback-use-envelopes branch November 8, 2023 15:49
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.

3 participants