Skip to content

Commit 80b6939

Browse files
authored
feat(tracing): Add @sentry-internal/tracing package (#7445)
1 parent d6561b8 commit 80b6939

11 files changed

+132
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"packages/svelte",
6262
"packages/sveltekit",
6363
"packages/tracing",
64+
"packages/tracing-internal",
6465
"packages/types",
6566
"packages/typescript",
6667
"packages/utils",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: ['../../.eslintrc.js'],
3+
overrides: [
4+
{
5+
files: ['src/**'],
6+
rules: {
7+
'@sentry-internal/sdk/no-optional-chaining': 'off',
8+
},
9+
},
10+
],
11+
};

packages/tracing-internal/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright (c) 2020 Sentry (https://sentry.io) and individual contributors. All rights reserved.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
5+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
6+
persons to whom the Software is furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
9+
Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
12+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
13+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
14+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

packages/tracing-internal/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<p align="center">
2+
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
4+
</a>
5+
</p>
6+
7+
## Sentry Internal Tracing Package - Do not use directly, for internal use only
8+
9+
This is an internal package that is being used to migrate @sentry/tracing code to its respective runtime packages.
10+
11+
For v8, @sentry/tracing will be dropped and the code in this package will be split into @sentry/browser and @sentry/node.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('../../jest/jest.config.js');
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"name": "@sentry-internal/tracing",
3+
"version": "7.43.0",
4+
"description": "Sentry Internal Tracing Package",
5+
"repository": "git://github.com/getsentry/sentry-javascript.git",
6+
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/tracing-internal",
7+
"author": "Sentry",
8+
"license": "MIT",
9+
"engines": {
10+
"node": ">=8"
11+
},
12+
"main": "build/cjs/index.js",
13+
"module": "build/esm/index.js",
14+
"types": "build/types/index.d.ts",
15+
"publishConfig": {
16+
"access": "public"
17+
},
18+
"dependencies": {
19+
"@sentry/core": "7.43.0",
20+
"@sentry/types": "7.43.0",
21+
"@sentry/utils": "7.43.0",
22+
"tslib": "^1.9.3"
23+
},
24+
"devDependencies": {
25+
"@sentry/browser": "7.43.0",
26+
"@types/express": "^4.17.14"
27+
},
28+
"scripts": {
29+
"build": "run-p build:transpile build:types",
30+
"build:dev": "yarn build",
31+
"build:transpile": "rollup -c rollup.npm.config.js",
32+
"build:types": "tsc -p tsconfig.types.json",
33+
"build:watch": "run-p build:transpile:watch build:types:watch",
34+
"build:dev:watch": "run-p build:transpile:watch build:types:watch",
35+
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
36+
"build:types:watch": "tsc -p tsconfig.types.json --watch",
37+
"build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
38+
"clean": "rimraf build coverage sentry-tracing-*.tgz",
39+
"fix": "run-s fix:eslint fix:prettier",
40+
"fix:eslint": "eslint . --format stylish --fix",
41+
"fix:prettier": "prettier --write \"{src,test,scripts}/**/**.ts\"",
42+
"lint": "run-s lint:prettier lint:eslint",
43+
"lint:eslint": "eslint . --format stylish",
44+
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
45+
"test:unit": "jest",
46+
"test": "jest",
47+
"test:watch": "jest --watch"
48+
},
49+
"volta": {
50+
"extends": "../../package.json"
51+
}
52+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { makeBaseNPMConfig, makeNPMConfigVariants } from '../../rollup/index.js';
2+
3+
export default makeNPMConfigVariants(makeBaseNPMConfig());
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig.json",
3+
4+
"include": ["src/**/*"],
5+
6+
"compilerOptions": {
7+
// package-specific options
8+
}
9+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
4+
"include": ["test/**/*"],
5+
6+
"compilerOptions": {
7+
// should include all types from `./tsconfig.json` plus types for all test frameworks used
8+
"types": ["node", "jest"]
9+
10+
// other package-specific, test-specific options
11+
}
12+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
// We don't need types for this because we don't ship it in our npm bundle. Skipping it here also lets us get around
4+
// the fact that it introduces a dependency on `@sentry/browser` which doesn't exist anywhere else in the SDK, which
5+
// then prevents us from building that and this at the same time when doing a parallellized build from the repo root
6+
// level.
7+
"exclude": [
8+
"src/index.bundle.ts",
9+
"src/index.bundle.replay.ts"
10+
],
11+
"compilerOptions": {
12+
"declaration": true,
13+
"declarationMap": true,
14+
"emitDeclarationOnly": true,
15+
"outDir": "build/types"
16+
}
17+
}

0 commit comments

Comments
 (0)