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

Automatically enable debug mode for posthog-js on SELF_CAPTURE #3613

Merged
merged 3 commits into from Mar 17, 2021

Conversation

paolodamico
Copy link
Contributor

Changes

If SELF_CAPTURE = True (i.e. on local development instances), we automatically enable debug mode on posthog-js so that all events are logged to the console.

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests

@paolodamico paolodamico requested a review from macobo March 10, 2021 00:56
@timgl timgl temporarily deployed to posthog-enable-debug-on-uqvi5k March 10, 2021 01:00 Inactive
@macobo
Copy link
Contributor

macobo commented Mar 10, 2021

Q: What's the goal of setting this though? What sort of insights are you looking for.

As for the typescript error - your change made another (ignored) error change locations. You'll need to either update .ts-strict-blacklist or fix it :)

@paolodamico
Copy link
Contributor Author

The TS error has been addressed in the posthog-js library, so tests should now pass. The goal of this PR is that if you're running on development, you see all the posthog capture requests in your console. This can help test and debug event instrumentation.

@Twixes Twixes temporarily deployed to posthog-enable-debug-on-bor3dh March 16, 2021 00:38 Inactive
@macobo
Copy link
Contributor

macobo commented Mar 16, 2021

Seems a bit noisy but sure.

@paolodamico
Copy link
Contributor Author

Will merge and we can remove if we realize it's not helpful.

@paolodamico paolodamico merged commit 7c6bd06 into master Mar 17, 2021
@paolodamico paolodamico deleted the enable-debug-on-self-capture branch March 17, 2021 19:32
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

4 participants