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: add ee licensed replay transformer #18874

Merged
merged 49 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d8afa8d
feat: add ee licensed replay transformer
pauldambra Nov 23, 2023
4f2a6e5
fix
pauldambra Nov 23, 2023
1cc274a
fix
pauldambra Nov 23, 2023
5d5463c
fix one thing to break another
pauldambra Nov 23, 2023
4c9dbb2
Merge branch 'master' into feat/add-ee-licensed-replay-transformer
pauldambra Nov 23, 2023
9fd01f6
fix
pauldambra Nov 23, 2023
28436ca
Merge branch 'master' into feat/add-ee-licensed-replay-transformer
pauldambra Nov 24, 2023
d281e06
sketch
pauldambra Nov 24, 2023
c429ebf
more like this
pauldambra Nov 24, 2023
dc3428f
some dead code
pauldambra Nov 24, 2023
a8f46a0
will need a linter to avoid making this mistake every time
pauldambra Nov 24, 2023
64ed017
lint usage of EE TS
pauldambra Nov 24, 2023
15c2855
fix
pauldambra Nov 27, 2023
f96f0d0
fix
pauldambra Nov 27, 2023
d07a265
fix
pauldambra Nov 27, 2023
d90f557
Update UI snapshots for `chromium` (2)
github-actions[bot] Nov 27, 2023
162e6cd
Update UI snapshots for `chromium` (2)
github-actions[bot] Nov 27, 2023
91e0085
fix
pauldambra Nov 27, 2023
b3a1bae
fix
pauldambra Nov 27, 2023
2326fd8
fix
pauldambra Nov 27, 2023
7500e71
Update query snapshots
github-actions[bot] Nov 27, 2023
1c37fb6
Update query snapshots
github-actions[bot] Nov 27, 2023
1be033d
broken _and_ working
pauldambra Nov 27, 2023
cbfa8e9
Revert "broken _and_ working"
pauldambra Nov 27, 2023
a7504d3
dynamic import so that the bundler follows into the code
pauldambra Nov 27, 2023
ecb8e8e
fix
pauldambra Nov 27, 2023
a4efe4d
Merge branch 'master' into feat/add-ee-licensed-replay-transformer
pauldambra Nov 27, 2023
9fe4211
Update UI snapshots for `webkit` (2)
github-actions[bot] Nov 27, 2023
166b523
Update UI snapshots for `chromium` (1)
github-actions[bot] Nov 27, 2023
5e8ff8b
Update UI snapshots for `chromium` (2)
github-actions[bot] Nov 27, 2023
48c189a
Update UI snapshots for `chromium` (1)
github-actions[bot] Nov 27, 2023
b424e75
fix
pauldambra Nov 28, 2023
6c2544d
fix
pauldambra Nov 28, 2023
8f8dc15
no kakfa settings change
pauldambra Nov 28, 2023
466f1c4
Merge branch 'master' into feat/add-ee-licensed-replay-transformer
pauldambra Nov 28, 2023
19b480e
fix
pauldambra Nov 28, 2023
f150b4c
Merge branch 'master' into feat/add-ee-licensed-replay-transformer
pauldambra Nov 28, 2023
ff3f0c6
Fix
pauldambra Nov 28, 2023
3600dd4
implement alignment for text
pauldambra Nov 28, 2023
0394712
Update .github/workflows/ci-frontend.yml
pauldambra Nov 28, 2023
16f8755
Update jest.config.ts
pauldambra Nov 28, 2023
ab3a492
Update query snapshots
github-actions[bot] Nov 28, 2023
ecd37cf
Update query snapshots
github-actions[bot] Nov 28, 2023
8e1e613
Update UI snapshots for `chromium` (2)
github-actions[bot] Nov 28, 2023
60e5d47
Merge branch 'master' into feat/add-ee-licensed-replay-transformer
pauldambra Nov 28, 2023
532ce4f
fix tests
pauldambra Nov 28, 2023
b902fea
Update UI snapshots for `chromium` (1)
github-actions[bot] Nov 28, 2023
895e6de
fix
pauldambra Nov 28, 2023
6877482
Merge branch 'master' into feat/add-ee-licensed-replay-transformer
pauldambra Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.eslintrc.js
jest.config.ts
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module.exports = {
'compat',
'posthog',
'simple-import-sort',
'import',
],
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
Expand Down Expand Up @@ -261,6 +262,19 @@ module.exports = {
'no-constant-condition': 'off',
'no-prototype-builtins': 'off',
'no-irregular-whitespace': 'off',
'import/no-restricted-paths': [
'error',
{
zones: [
{
target: './frontend/**',
from: './ee/frontend/**',
message:
"EE licensed TypeScript should only be accessed via the posthogEE objects. Use `import posthogEE from '@posthog/ee/exports'`",
},
],
},
],
},
overrides: [
{
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# NOTE: we are at risk of missing a dependency here.
- 'bin/**'
- 'frontend/**'
- 'ee/frontend/**'
- 'ee/frontend/**'
pauldambra marked this conversation as resolved.
Show resolved Hide resolved
# Make sure we run if someone is explicitly change the workflow
- .github/workflows/ci-frontend.yml
# various JS config files
Expand Down Expand Up @@ -107,6 +107,10 @@ jobs:
if: needs.changes.outputs.frontend == 'true'
run: pnpm schema:build:json && git diff --exit-code

- name: Check if mobile replay "schema.json" is up to date
if: needs.changes.outputs.frontend == 'true'
run: pnpm mobile-replay:schema:build:json && git diff --exit-code

- name: Check toolbar bundle size
if: needs.changes.outputs.frontend == 'true'
uses: preactjs/compressed-size-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .run/PostHog.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<env name="PYTHONUNBUFFERED" value="1" />
<env name="SESSION_RECORDING_KAFKA_COMPRESSION" value="gzip" />
<env name="SESSION_RECORDING_KAFKA_HOSTS" value="localhost" />
<env name="SESSION_RECORDING_KAFKA_MAX_REQUEST_SIZE_BYTES" value="524288" />
<env name="SESSION_RECORDING_KAFKA_MAX_REQUEST_SIZE_BYTES" value="20971520" />
pauldambra marked this conversation as resolved.
Show resolved Hide resolved
<env name="SKIP_SERVICE_VERSION_REQUIREMENTS" value="1" />
<env name="REPLAY_EVENTS_NEW_CONSUMER_RATIO" value="1" />
</envs>
Expand Down Expand Up @@ -48,4 +48,4 @@
<option name="customRunCommand" value="" />
<method v="2" />
</configuration>
</component>
</component>
19 changes: 9 additions & 10 deletions ee/frontend/exports.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { PostHogEE } from '@posthog/ee/types'

const myTestCode = (): void => {
// eslint-disable-next-line no-console
console.log('it works!')
}
import { transformEventToWeb, transformToWeb } from './mobile-replay'

const postHogEE: PostHogEE = {
enabled: true,
myTestCode,
}

export default postHogEE
export default async (): Promise<PostHogEE> =>
Promise.resolve({
enabled: true,
mobileReplay: {
transformEventToWeb,
transformToWeb,
},
})
Loading
Loading