Skip to content

Commit 6e275e6

Browse files
committed
ci: Move replay metrics into dedicated package
1 parent 20a970c commit 6e275e6

Some content is hidden

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

64 files changed

+1056
-10488
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -793,8 +793,8 @@ jobs:
793793
run: |
794794
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1
795795
796-
replay_metrics:
797-
name: Replay Metrics
796+
overhead_metrics:
797+
name: Overhead metrics
798798
needs: [job_get_metadata, job_build]
799799
runs-on: ubuntu-20.04
800800
timeout-minutes: 30
@@ -819,18 +819,14 @@ jobs:
819819
path: ${{ env.CACHED_BUILD_PATHS }}
820820
key: ${{ env.BUILD_CACHE_KEY }}
821821

822-
- name: Setup
823-
run: yarn install
824-
working-directory: packages/replay/metrics
825-
826822
- name: Collect
827823
run: yarn ci:collect
828-
working-directory: packages/replay/metrics
824+
working-directory: packages/metrics
829825

830826
- name: Process
831827
id: process
832828
run: yarn ci:process
833-
working-directory: packages/replay/metrics
829+
working-directory: packages/metrics
834830
# Don't run on forks - the PR comment cannot be added.
835831
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
836832
env:

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"packages/hub",
4545
"packages/integration-tests",
4646
"packages/integrations",
47+
"packages/metrics",
4748
"packages/nextjs",
4849
"packages/node",
4950
"packages/node-integration-tests",

packages/replay/metrics/.eslintrc.cjs renamed to packages/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
],
File renamed without changes.
File renamed without changes.

packages/replay/metrics/configs/ci/collect.ts renamed to packages/metrics/configs/ci/collect.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
import { Metrics, MetricsCollector } from '../../src/collector.js';
2-
import { MetricsStats, NumberProvider } from '../../src/results/metrics-stats.js';
1+
import type { Metrics} from '../../src/collector.js';
2+
import { MetricsCollector } from '../../src/collector.js';
3+
import type { NumberProvider } from '../../src/results/metrics-stats.js';
4+
import { MetricsStats } from '../../src/results/metrics-stats.js';
35
import { JankTestScenario } from '../../src/scenarios.js';
46
import { printStats } from '../../src/util/console.js';
57
import { latestResultFile } from './env.js';

packages/replay/metrics/configs/dev/collect.ts renamed to packages/metrics/configs/dev/collect.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { Metrics, MetricsCollector } from '../../src/collector.js';
1+
import type { Metrics} from '../../src/collector.js';
2+
import { MetricsCollector } from '../../src/collector.js';
23
import { MetricsStats } from '../../src/results/metrics-stats.js';
34
import { JankTestScenario } from '../../src/scenarios.js';
45
import { printStats } from '../../src/util/console.js';

packages/replay/metrics/package.json renamed to packages/metrics/package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
{
22
"private": true,
3-
"name": "metrics",
3+
"version": "7.36.0",
4+
"name": "@sentry-internal/metrics",
45
"main": "index.js",
56
"author": "Sentry",
67
"license": "MIT",
78
"type": "module",
89
"scripts": {
910
"build": "tsc",
10-
"deps": "yarn --cwd ../ build:bundle && yarn --cwd ../../tracing/ build:bundle",
1111
"dev:collect": "ts-node-esm ./configs/dev/collect.ts",
1212
"dev:process": "ts-node-esm ./configs/dev/process.ts",
1313
"ci:collect": "ts-node-esm ./configs/ci/collect.ts",
14-
"ci:process": "ts-node-esm ./configs/ci/process.ts"
14+
"ci:process": "ts-node-esm ./configs/ci/process.ts",
15+
"fix": "run-s fix:eslint fix:prettier",
16+
"fix:eslint": "eslint . --format stylish --fix",
17+
"fix:prettier": "prettier --write \"{src,test,scripts,worker}/**/*.ts\"",
18+
"lint": "run-s lint:prettier lint:eslint",
19+
"lint:eslint": "eslint . --format stylish",
20+
"lint:prettier": "prettier --check \"{src,test,scripts,worker}/**/*.ts\""
1521
},
1622
"dependencies": {
1723
"@octokit/rest": "^19.0.5",

0 commit comments

Comments
 (0)