-
Notifications
You must be signed in to change notification settings - Fork 125
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: Create elements chain string as we store it #823
Conversation
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
src/autocapture-utils.ts
Outdated
} | ||
|
||
function escapeQuotes(input: string): string { | ||
return input.replace(/"/g, '\\"') |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding
Size Change: +6.22 kB (+1%) Total Size: 745 kB
ℹ️ View Unchanged
|
src/autocapture.ts
Outdated
@@ -255,7 +256,7 @@ const autocapture = { | |||
const props = _extend( | |||
this._getDefaultProperties(e.type), | |||
{ | |||
$elements: elementsJson, | |||
$elements_chain: getElementsChainString(elementsJson), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should gradually roll this out to team 2 first for safety, see how capture-rs rollouts are happening
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't approve my own pull requests, but looks good, so you can approve it @davemurphysf 😅
* Adding flag in decide response to allow returning elements chain as a string; related PR: PostHog/posthog-js#823 * Created a separate env var to control this behavior in https://github.com/PostHog/posthog-cloud-infra/pull/2314 * Update query snapshots * Add env var * Update query snapshots * Formatting * Just use a boolean * Add test for when ELEMENT_CHAIN_AS_STRING_TEAMS is set and not set * Fix test --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (obvs)
Changes
Depends on:
Part 2 of https://posthog.slack.com/archives/C02E3BKC78F/p1695902166122979?thread_ts=1695901794.213689&cid=C02E3BKC78F
...
Checklist