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

feat: Allow users to enable session replay during product analytics onboarding #22339

Merged
merged 2 commits into from
May 20, 2024

Conversation

xrdt
Copy link
Contributor

@xrdt xrdt commented May 16, 2024

Problem

The toggle is gated behind a 50% flag. https://us.posthog.com/project/2/experiments/33719

Changes

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Does this work well for both Cloud and self-hosted?

How did you test this code?

Copy link
Contributor

github-actions bot commented May 16, 2024

Size Change: -40 B (0%)

Total Size: 1.05 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 1.05 MB -40 B (0%)

compressed-size-action

@xrdt
Copy link
Contributor Author

xrdt commented May 17, 2024

Not sure why the experiments test keeps failing @neilkakkar @jurajmajerik , am I missing something?

]

if (featureFlags[FEATURE_FLAGS.ENABLE_SESSION_REPLAY_PA_ONBOARDING]) {
options.push({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we also enable console logs, network performance?

Copy link
Member

Choose a reason for hiding this comment

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

yep iirc the default in replay is console logs and "performance" opt in, not headers or body capture

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, added.

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

didn't run it but looks good to me

@xrdt xrdt merged commit e42edc4 into master May 20, 2024
83 checks passed
@xrdt xrdt deleted the by/enable-session-recording-pa-onboarding branch May 20, 2024 15:29
timgl pushed a commit that referenced this pull request May 21, 2024
…nboarding (#22339)

* flag toggle to enable session replay during pa onboarding

* turn on console log, network perf by default
thmsobrmlr pushed a commit that referenced this pull request May 21, 2024
…nboarding (#22339)

* flag toggle to enable session replay during pa onboarding

* turn on console log, network perf by default
Comment on lines +65 to +81
...configOptions
.filter((option) => option.visible)
.map((option) => ({
title: option.title,
description: option.description,
type: option.type as ConfigType,
selectOptions: option.selectOptions,
value: option.value,
onChange: (newValue: boolean | string | number) => {
// Use the current value from the ref to ensure that onChange always accesses
// the latest state of configOptions, preventing the closure from using stale data.
const updatedConfigOptions = configOptionsRef.current.map((o) =>
o.teamProperty === option.teamProperty ? { ...o, value: newValue } : o
)
setConfigOptions(updatedConfigOptions)
},
})),
Copy link
Member

Choose a reason for hiding this comment

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

@zlwaterfield when we move to a single subscribe, we should make sure people are aware of the potential costs here when enabling replay from analytics onboarding.

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

3 participants