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

ref(utils): Stop setting transaction in requestDataIntegration #14306

Merged
merged 6 commits into from
Nov 15, 2024

Conversation

mydea
Copy link
Member

@mydea mydea commented Nov 14, 2024

This is not really necessary anymore - it only sets this on transaction events, and those get the transaction in different places already anyhow.

With this, we can also actually remove some other stuff. One method is exported from utils but not otherwise used, we can also drop this in v9.

Finally, this was also the only place that used route on the request, so we can also get rid of this in remix, which is weird anyhow because we set it for errors there but don't even use it for them.

@mydea mydea self-assigned this Nov 14, 2024
Copy link
Contributor

github-actions bot commented Nov 14, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.77 KB - -
@sentry/browser - with treeshaking flags 21.53 KB - -
@sentry/browser (incl. Tracing) 35.27 KB - -
@sentry/browser (incl. Tracing, Replay) 71.99 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.37 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 76.3 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 89.15 KB - -
@sentry/browser (incl. Feedback) 39.93 KB - -
@sentry/browser (incl. sendFeedback) 27.42 KB - -
@sentry/browser (incl. FeedbackAsync) 32.23 KB - -
@sentry/react 25.52 KB - -
@sentry/react (incl. Tracing) 38.23 KB - -
@sentry/vue 26.92 KB - -
@sentry/vue (incl. Tracing) 37.1 KB - -
@sentry/svelte 22.91 KB - -
CDN Bundle 24.13 KB - -
CDN Bundle (incl. Tracing) 37.05 KB - -
CDN Bundle (incl. Tracing, Replay) 71.71 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 77.06 KB - -
CDN Bundle - uncompressed 70.73 KB - -
CDN Bundle (incl. Tracing) - uncompressed 109.93 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 222.45 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 235.67 KB - -
@sentry/nextjs (client) 38.35 KB - -
@sentry/sveltekit (client) 35.85 KB - -
@sentry/node 134.05 KB -0.18% -244 B 🔽
@sentry/node - without tracing 96.24 KB -0.23% -224 B 🔽
@sentry/aws-serverless 106.49 KB -0.22% -236 B 🔽

View base workflow run

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

LGTM, happy we can get rid of this!

@@ -35,6 +34,7 @@ export type AddRequestDataToEventOptions = {
include?: {
ip?: boolean;
request?: boolean | Array<(typeof DEFAULT_REQUEST_INCLUDES)[number]>;
/** @deprecated This option will be removed in v9. It does not do anything anymore, the `transcation` is set in other places. */
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/** @deprecated This option will be removed in v9. It does not do anything anymore, the `transcation` is set in other places. */
/**
* @deprecated This option will be removed with the next major version of the SDK. If you want to disable capturing of the URL, please use the `request` option instead.
*/

maybe a bit more transparent

Copy link
Member Author

Choose a reason for hiding this comment

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

but the request is quite different from this, isn't it? Opting out of the request there will not affect the transaction being set on the transaction event - though to be honest, it probably did not actually affect it even before, because that was set anyhow by other code already 😅

@lforst
Copy link
Member

lforst commented Nov 14, 2024

Actually, I think this means we can also deprecate transactionNamingScheme.

mydea and others added 4 commits November 15, 2024 09:44
This is not really necessary anymore - it only sets this on transaction events, and those get the `transaction` in different places already anyhow.

With this, we can also actually remove some other stuff. One method is exported from utils but not otherwise used, we can also drop this in v9.

Finally, this was also the only place that used `route` on the request, so we can also get rid of this in `remix`, which is weird anyhow because we set it for errors there but don't even use it for them.
@mydea mydea force-pushed the fn/deprecate-transaction-method branch from edcca51 to 1025797 Compare November 15, 2024 08:44
@mydea mydea marked this pull request as ready for review November 15, 2024 08:52
@mydea
Copy link
Member Author

mydea commented Nov 15, 2024

Actually, I think this means we can also deprecate transactionNamingScheme.

Good point, also deprecated this!

Copy link

codecov bot commented Nov 15, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
241 1 240 9
View the top 1 failed tests by shortest run time
client-app-routing-instrumentation.test.ts Creates a navigation transaction for app router routes
Stack Traces | 30s run time
client-app-routing-instrumentation.test.ts:19:5 Creates a navigation transaction for app router routes

To view more test analytics, go to the Test Analytics Dashboard
Got feedback? Let us know on Github

@mydea mydea merged commit 12902c5 into develop Nov 15, 2024
149 checks passed
@mydea mydea deleted the fn/deprecate-transaction-method branch November 15, 2024 09:28
@mydea mydea linked an issue Nov 15, 2024 that may be closed by this pull request
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.

Deprecate AddRequestDataToEventOptions.transaction
3 participants