Skip to content

fix(replay): fixed type for options of replayIntegration #10325

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 1 commit into from
Jan 24, 2024

Conversation

Shubhdeep12
Copy link
Contributor

Before submitting a pull request, please take a look at our
Contributing guidelines and verify:

@AbhiPrasad AbhiPrasad requested review from billyvg and mydea January 24, 2024 17:06
@@ -30,7 +30,7 @@ let _initialized = false;
type InitialReplayPluginOptions = Omit<ReplayPluginOptions, 'sessionSampleRate' | 'errorSampleRate'> &
Partial<Pick<ReplayPluginOptions, 'sessionSampleRate' | 'errorSampleRate'>>;

export const replayIntegration = ((options?: InitialReplayPluginOptions) => {
export const replayIntegration = ((options?: ReplayConfiguration) => {
Copy link
Member

Choose a reason for hiding this comment

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

We'll want the options type to be

Omit<ReplayPluginOptions, 'sessionSampleRate' | 'errorSampleRate'>

because these sample rate options are deprecated and slated to be removed, can you confirm @mydea?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok then, In that case i guess it should be wrapped with Partial then.
Because the options are required in ReplayPluginOptions type. Causing the error mentioned.

Copy link
Member

Choose a reason for hiding this comment

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

@Shubhdeep12 Ah my mistake, it should be Omit<ReplayConfiguration, 'sessionSampleRate' | 'errorSampleRate'>

Copy link
Member

Choose a reason for hiding this comment

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

So I think ReplayConfiguration is correct for now, we can remove the deprecated fields in a follow up in v8!

@mydea
Copy link
Member

mydea commented Jan 24, 2024

Thank you!

@mydea mydea merged commit f613940 into getsentry:develop Jan 24, 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.

Unable to override only a few options for replayIntegration
3 participants