Skip to content

feat(tracing): Add @sentry-internal/tracing package #7445

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

Merged
merged 3 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"packages/svelte",
"packages/sveltekit",
"packages/tracing",
"packages/tracing-internal",
"packages/types",
"packages/typescript",
"packages/utils",
Expand Down
11 changes: 11 additions & 0 deletions packages/tracing-internal/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
extends: ['../../.eslintrc.js'],
overrides: [
{
files: ['src/**'],
rules: {
'@sentry-internal/sdk/no-optional-chaining': 'off',
},
},
],
};
14 changes: 14 additions & 0 deletions packages/tracing-internal/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright (c) 2020 Sentry (https://sentry.io) and individual contributors. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 changes: 11 additions & 0 deletions packages/tracing-internal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<p align="center">
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
</a>
</p>

## Sentry Internal Tracing Package - Do not use directly, for internal use only

This is an internal package that is being used to migrate @sentry/tracing code to its respective runtime packages.

For v8, @sentry/tracing will be dropped and the code in this package will be split into @sentry/browser and @sentry/node.
1 change: 1 addition & 0 deletions packages/tracing-internal/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('../../jest/jest.config.js');
52 changes: 52 additions & 0 deletions packages/tracing-internal/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "@sentry-internal/tracing",
"version": "7.43.0",
"description": "Sentry Internal Tracing Package",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/tracing-internal",
"author": "Sentry",
"license": "MIT",
"engines": {
"node": ">=8"
},
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/core": "7.43.0",
"@sentry/types": "7.43.0",
"@sentry/utils": "7.43.0",
"tslib": "^1.9.3"
},
"devDependencies": {
"@sentry/browser": "7.43.0",
"@types/express": "^4.17.14"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
"build:transpile": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:watch": "run-p build:transpile:watch build:types:watch",
"build:dev:watch": "run-p build:transpile:watch build:types:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.js --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
"clean": "rimraf build coverage sentry-tracing-*.tgz",
"fix": "run-s fix:eslint fix:prettier",
"fix:eslint": "eslint . --format stylish --fix",
"fix:prettier": "prettier --write \"{src,test,scripts}/**/**.ts\"",
"lint": "run-s lint:prettier lint:eslint",
"lint:eslint": "eslint . --format stylish",
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
"test:unit": "jest",
"test": "jest",
"test:watch": "jest --watch"
},
"volta": {
"extends": "../../package.json"
}
}
3 changes: 3 additions & 0 deletions packages/tracing-internal/rollup.npm.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { makeBaseNPMConfig, makeNPMConfigVariants } from '../../rollup/index.js';

export default makeNPMConfigVariants(makeBaseNPMConfig());
1 change: 1 addition & 0 deletions packages/tracing-internal/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
9 changes: 9 additions & 0 deletions packages/tracing-internal/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",

"include": ["src/**/*"],

"compilerOptions": {
// package-specific options
}
}
12 changes: 12 additions & 0 deletions packages/tracing-internal/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",

"include": ["test/**/*"],

"compilerOptions": {
// should include all types from `./tsconfig.json` plus types for all test frameworks used
"types": ["node", "jest"]

// other package-specific, test-specific options
}
}
17 changes: 17 additions & 0 deletions packages/tracing-internal/tsconfig.types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "./tsconfig.json",
// 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
// the fact that it introduces a dependency on `@sentry/browser` which doesn't exist anywhere else in the SDK, which
// then prevents us from building that and this at the same time when doing a parallellized build from the repo root
// level.
"exclude": [
"src/index.bundle.ts",
"src/index.bundle.replay.ts"
],
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"outDir": "build/types"
}
}