Skip to content

ref(core)!: Cleanup internal types, including ReportDialogOptions #14861

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 2 commits into from
Jan 9, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Dec 30, 2024

These are small changes, cleaning up outdated (I believe?) TODOs, and some internal type stuff.

@mydea mydea self-assigned this Dec 30, 2024
@@ -131,7 +131,6 @@ function _isIgnoredTransaction(event: Event, ignoreTransactions?: Array<string |
}

function _isDeniedUrl(event: Event, denyUrls?: Array<string | RegExp>): boolean {
// TODO: Use Glob instead?
Copy link
Member Author

Choose a reason for hiding this comment

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

@AbhiPrasad I think this is not really relevant anymore, is it? 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Yeah we can remove!

@@ -19,8 +19,6 @@ interface Performance {

/**
* Returns a timestamp in seconds since the UNIX epoch using the Date API.
*
* TODO(v8): Return type should be rounded.
Copy link
Member Author

Choose a reason for hiding this comment

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

@AbhiPrasad I think this would be pretty breaking, I do not think we actually want to reduce fidelity here? Or am I missing something?

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 we added this because relay assumes that seconds comes in as integers, not floats. Let's ping ingest to double check.

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 this would lose a whole lot of accuracy, wouldn't it? Or how would you then send sub-second timestamps?

@@ -32,8 +32,7 @@ export function setContextOnScope(scope: Scope, context: Context): void {

/**
* Get the context related to a scope.
* TODO v8: Use this for the `trace` functions.
Copy link
Member Author

Choose a reason for hiding this comment

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

We are already doing this, so all good :D

Copy link
Contributor

github-actions bot commented Dec 30, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.74 KB - -
@sentry/browser - with treeshaking flags 21.51 KB - -
@sentry/browser (incl. Tracing) 35.39 KB +0.01% +1 B 🔺
@sentry/browser (incl. Tracing, Replay) 72.09 KB -0.01% -1 B 🔽
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.62 KB -0.01% -1 B 🔽
@sentry/browser (incl. Tracing, Replay with Canvas) 76.36 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 88.38 KB +0.01% +1 B 🔺
@sentry/browser (incl. Feedback) 39.07 KB - -
@sentry/browser (incl. sendFeedback) 27.42 KB - -
@sentry/browser (incl. FeedbackAsync) 32.25 KB - -
@sentry/react 25.49 KB - -
@sentry/react (incl. Tracing) 38.15 KB +0.01% +1 B 🔺
@sentry/vue 27.08 KB - -
@sentry/vue (incl. Tracing) 37.24 KB +0.01% +2 B 🔺
@sentry/svelte 22.86 KB - -
CDN Bundle 24.12 KB - -
CDN Bundle (incl. Tracing) 35.69 KB -0.02% -4 B 🔽
CDN Bundle (incl. Tracing, Replay) 70.24 KB -0.01% -5 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) 75.45 KB -0.01% -4 B 🔽
CDN Bundle - uncompressed 70.47 KB - -
CDN Bundle (incl. Tracing) - uncompressed 106.04 KB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed 216.92 KB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 229.67 KB -0.01% -1 B 🔽
@sentry/nextjs (client) 38.28 KB +0.01% +2 B 🔺
@sentry/sveltekit (client) 35.9 KB +0.01% +2 B 🔺
@sentry/node 161.47 KB +0.01% +1 B 🔺
@sentry/node - without tracing 97.28 KB +0.01% +1 B 🔺
@sentry/aws-serverless 127.12 KB - -

View base workflow run

Copy link

codecov bot commented Dec 30, 2024

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
697 5 692 298
View the top 2 failed tests by shortest run time
client/app-dir-pageloads.test.ts should create a pageload transaction when the `app` directory is used
Stack Traces | 120s run time
app-dir-pageloads.test.ts:4:5 should create a pageload transaction when the `app` directory is used
client/click-error.test.ts should send error for faulty click handlers
Stack Traces | 120s run time
click-error.test.ts:4:5 should send error for faulty click handlers
View the full list of 1 ❄️ flaky tests
client-app-routing-instrumentation.test.ts Creates a navigation transaction for app router routes

Flake rate in main: 9.09% (Passed 30 times, Failed 3 times)

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
📢 Thoughts on this report? Let us know!

@@ -131,7 +131,6 @@ function _isIgnoredTransaction(event: Event, ignoreTransactions?: Array<string |
}

function _isDeniedUrl(event: Event, denyUrls?: Array<string | RegExp>): boolean {
// TODO: Use Glob instead?
Copy link
Member

Choose a reason for hiding this comment

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

Yeah we can remove!

@@ -19,8 +19,6 @@ interface Performance {

/**
* Returns a timestamp in seconds since the UNIX epoch using the Date API.
*
* TODO(v8): Return type should be rounded.
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 we added this because relay assumes that seconds comes in as integers, not floats. Let's ping ingest to double check.

// TODO(v9): Change this to [key: string]: unknkown;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[key: string]: any;
[key: string]: unknown;
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 this requires a changelog entry.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a changelog entry!

@mydea mydea changed the title ref(core): Cleanup todos & internal types ref(core): Cleanup internal types Dec 30, 2024
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

ReportDialogOptions changes needs a changelog entry because we are breaking the types.

@@ -47,9 +47,7 @@ export function getEnvelopeEndpointWithUrlEncodedAuth(dsn: DsnComponents, tunnel
export function getReportDialogEndpoint(
dsnLike: DsnLike,
dialogOptions: {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this should be typed with ReportDialogOptions

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved the type to core so we can reuse this here!

@mydea mydea force-pushed the fn/cleanup-todos branch from 2b01487 to a36df93 Compare January 3, 2025 12:02
@mydea mydea changed the title ref(core): Cleanup internal types ref(core)!: Cleanup internal types, including ReportDialogOptions Jan 3, 2025
@mydea mydea requested a review from AbhiPrasad January 3, 2025 12:43
@mydea mydea force-pushed the fn/cleanup-todos branch from a36df93 to 3bfcc1a Compare January 8, 2025 14:32
@mydea mydea merged commit 2327642 into develop Jan 9, 2025
153 checks passed
@mydea mydea deleted the fn/cleanup-todos branch January 9, 2025 08:29
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

2 participants