Skip to content

Commit e471837

Browse files
authored
ci: Move replay metrics into dedicated package (#7115)
1 parent 3324324 commit e471837

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1315
-10762
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,8 @@ jobs:
802802
run: |
803803
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1
804804
805-
replay_metrics:
806-
name: Replay Metrics
805+
overhead_metrics:
806+
name: Overhead metrics
807807
needs: [job_get_metadata, job_build]
808808
runs-on: ubuntu-20.04
809809
timeout-minutes: 30
@@ -828,18 +828,14 @@ jobs:
828828
path: ${{ env.CACHED_BUILD_PATHS }}
829829
key: ${{ env.BUILD_CACHE_KEY }}
830830

831-
- name: Setup
832-
run: yarn install
833-
working-directory: packages/replay/metrics
834-
835831
- name: Collect
836832
run: yarn ci:collect
837-
working-directory: packages/replay/metrics
833+
working-directory: packages/overhead-metrics
838834

839835
- name: Process
840836
id: process
841837
run: yarn ci:process
842-
working-directory: packages/replay/metrics
838+
working-directory: packages/overhead-metrics
843839
# Don't run on forks - the PR comment cannot be added.
844840
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
845841
env:

.vscode/launch.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,6 @@
3737
"internalConsoleOptions": "openOnSessionStart",
3838
"outputCapture": "std"
3939
},
40-
{
41-
"type": "node",
42-
"name": "Debug replay metrics collection script",
43-
"request": "launch",
44-
"cwd": "${workspaceFolder}/packages/replay/metrics/",
45-
"program": "${workspaceFolder}/packages/replay/metrics/configs/dev/collect.ts",
46-
"preLaunchTask": "Build Replay metrics script",
47-
},
48-
{
49-
"type": "node",
50-
"name": "Debug replay metrics processing script",
51-
"request": "launch",
52-
"cwd": "${workspaceFolder}/packages/replay/metrics/",
53-
"program": "${workspaceFolder}/packages/replay/metrics/configs/dev/process.ts",
54-
"preLaunchTask": "Build Replay metrics script",
55-
},
5640
// Run rollup using the config file which is in the currently active tab.
5741
{
5842
"name": "Debug rollup (config from open file)",

.vscode/tasks.json

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
{
22
// See https://go.microsoft.com/fwlink/?LinkId=733558 for documentation about `tasks.json` syntax
3-
"version": "2.0.0",
4-
"tasks": [
5-
{
6-
"label": "Prepare nextjs integration test app for VSCode debugger",
7-
"type": "npm",
8-
"script": "predebug",
9-
"path": "packages/nextjs/test/integration/",
10-
"detail": "Link the SDK (if not already linked) and build test app",
11-
},
12-
{
13-
"label": "Build Replay metrics script",
14-
"type": "npm",
15-
"script": "build",
16-
"path": "packages/replay/metrics",
17-
}
18-
]
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"label": "Prepare nextjs integration test app for VSCode debugger",
7+
"type": "npm",
8+
"script": "predebug",
9+
"path": "packages/nextjs/test/integration/",
10+
"detail": "Link the SDK (if not already linked) and build test app"
11+
}
12+
]
1913
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"packages/hub",
4848
"packages/integration-tests",
4949
"packages/integrations",
50+
"packages/overhead-metrics",
5051
"packages/nextjs",
5152
"packages/node",
5253
"packages/node-integration-tests",

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"karma-typescript-es6-transform": "^4.0.0",
4141
"karma-webkit-launcher": "^1.0.2",
4242
"node-fetch": "^2.6.0",
43-
"playwright": "^1.27.1",
43+
"playwright": "^1.31.1",
4444
"sinon": "^7.3.2",
4545
"webpack": "^4.30.0"
4646
},

packages/integration-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
},
3333
"dependencies": {
3434
"@babel/preset-typescript": "^7.16.7",
35-
"@playwright/test": "^1.29.2",
35+
"@playwright/test": "^1.31.1",
3636
"babel-loader": "^8.2.2",
3737
"html-webpack-plugin": "^5.5.0",
3838
"pako": "^2.1.0",
39-
"playwright": "^1.29.2",
39+
"playwright": "^1.31.1",
4040
"typescript": "^4.5.2",
4141
"webpack": "^5.52.0"
4242
},

packages/replay/metrics/.eslintrc.cjs renamed to packages/overhead-metrics/.eslintrc.cjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
extends: ['../.eslintrc.js'],
2+
extends: ['../../.eslintrc.js'],
33
ignorePatterns: ['test-apps'],
44
overrides: [
55
{
@@ -8,6 +8,9 @@ module.exports = {
88
'no-console': 'off',
99
'@typescript-eslint/no-non-null-assertion': 'off',
1010
'import/no-unresolved': 'off',
11+
'@sentry-internal/sdk/no-optional-chaining': 'off',
12+
'@sentry-internal/sdk/no-nullish-coalescing': 'off',
13+
'jsdoc/require-jsdoc': 'off',
1114
},
1215
},
1316
],

packages/replay/metrics/README.md renamed to packages/overhead-metrics/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Replay performance metrics
1+
# Overhead performance metrics
22

3-
Evaluates Replay impact on website performance by running a web app in Chromium via Playwright and collecting various metrics.
3+
Evaluates Sentry & Replay impact on website performance by running a web app in Chromium via Playwright and collecting various metrics.
44

5-
The general idea is to run a web app without Sentry Replay and then run the same app again with Sentry and another one with Sentry+Replay included.
5+
The general idea is to run a web app without Sentry, and then run the same app again with Sentry and another one with Sentry+Replay included.
66
For the three scenarios, we collect some metrics (CPU, memory, vitals) and later compare them and post as a comment in a PR.
77
Changes in the metrics, compared to previous runs from the main branch, should be evaluated on case-by-case basis when preparing and reviewing the PR.
88

File renamed without changes.

0 commit comments

Comments
 (0)