You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to override only a few options for replayIntegration #10305
Pass a few options to replayIntegration in a TypeScript file.
Expected Result
Successful compilation - the changelog and migration docs make me think that this should work the same as new Replay({ maskAllText: true, blockAllMedia: true }).
Actual Result
Compilation errors - replayIntegration is declared as needing a nearly complete ReplayPluginOptions object, so it complains if any options are missing.
Reason - InitialReplayPluginOptions creates every option required except sessionSampleRate and errorSampleRate Suggested fix - the type for options should be ReplayConfiguration imported above and used in the constructor for the replay class.
let me know if it is correct. I'll create a PR then.
Thanks
Activity
jiadesen commentedon Jan 24, 2024
me too
Shubhdeep12 commentedon Jan 24, 2024
Hi @mydea it looks like the issue is here for replay integration -
sentry-javascript/packages/replay/src/integration.ts
Line 33 in 6fe349f
Reason -
InitialReplayPluginOptionscreates every option required exceptsessionSampleRateanderrorSampleRateSuggested fix - the type for options should be
ReplayConfigurationimported above and used in the constructor for the replay class.let me know if it is correct. I'll create a PR then.
Thanks
AbhiPrasad commentedon Jan 24, 2024
@Shubhdeep12 feel free to throw up a PR, I think that is correct
Shubhdeep12 commentedon Jan 24, 2024
ok great, added a PR @AbhiPrasad
fix(replay): Fix type for options of replayIntegration (#10325)