Skip to content

Commit af092e3

Browse files
authored
feat: Tracing + Reduced Bundle Size + build updates (#2038)
* feat: Tracing Integration * feat: Update dependencies * fix: Remove opentracing package since code moved into integration * fix: Ignore tsbuildinfo * feat: Tracing integration + refactorings * fix: linter * feat: Add more options to tracing integration * ref: Small internal refactoring * meta: Changelog * feat: Move transaction to scope * fix: Changelog * fix: Tests * fix: Run yarn install * fix: Also clone span * meta: Changelog and version bump * meta: Changelog * ci: Remove saucelabs test * fix: Docs error * fix: Use utils in integrations, Remove incremental mode * fix: Linting * ref: Remove async/await syntax * feat: SpanContext to Span * feat: CR * fix: CR
1 parent 4a05f9f commit af092e3

Some content is hidden

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

75 files changed

+1413
-1466
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ packages/*/esm/
99
coverage/
1010
scratch/
1111
*.pyc
12+
*.tsbuildinfo
1213

1314
# logs
1415
yarn-error.log

.travis.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ cache:
2121

2222
matrix:
2323
fast_finish: true
24-
allow_failures:
25-
- script: scripts/browser-saucelabs.sh
2624

2725
stages:
2826
- Test
@@ -70,13 +68,6 @@ jobs:
7068
chrome: stable
7169
firefox: latest
7270
script: scripts/raven-js.sh
73-
- stage: Saucelabs
74-
name: '@sentry/browser - SauceLabs tests'
75-
if: fork = false
76-
node_js: '8'
77-
addons:
78-
sauce_connect: true
79-
script: scripts/browser-saucelabs.sh
8071
- stage: Deploy
8172
name: '@sentry/packages - pack and zeus upload'
8273
node_js: '8'

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- [opentracing] ref: Removed opentracing package
6+
- [integrations] feat: Add tracing integration
7+
- [hub] feat: Add tracing related function to scope and hub (`Scope.startSpan`, `Scope.setSpan`, `Hub.traceHeaders`)
8+
- [hub] feat: Add new function to Scope `setContext`
9+
- [hub] feat: Add new function to Scope `setTransaction`
10+
311
## 5.1.3
412

513
- [browser] fix: GlobalHandler integration sometimes receives Event objects as message: Fix #1949

dangerfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { resolve } from 'path';
55
import tslint from 'danger-plugin-tslint';
66
import { prettyResults } from 'danger-plugin-tslint/dist/prettyResults';
77

8-
const packages = ['browser', 'core', 'hub', 'integrations', 'opentracing', 'minimal', 'node', 'types', 'utils'];
8+
const packages = ['browser', 'core', 'hub', 'integrations', 'minimal', 'node', 'types', 'utils'];
99

1010
export default async () => {
1111
if (!danger.github) {

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lerna": "3.4.0",
3-
"version": "5.1.3",
3+
"version": "5.2.0-beta.0",
44
"packages": "packages/*",
55
"ignore": "raven-*",
66
"npmClient": "yarn",

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,31 @@
3030
"packages/utils"
3131
],
3232
"devDependencies": {
33-
"@google-cloud/storage": "^2.3.1",
33+
"@google-cloud/storage": "^2.5.0",
3434
"@strictsoftware/typedoc-plugin-monorepo": "^0.2.1",
3535
"@types/chai": "^4.1.3",
3636
"@types/jest": "^24.0.11",
3737
"@types/mocha": "^5.2.0",
38-
"@types/node": "^11.11.3",
38+
"@types/node": "^11.13.7",
3939
"@types/raven": "^2.5.1",
40-
"@types/sinon": "^7.0.10",
40+
"@types/sinon": "^7.0.11",
4141
"chai": "^4.1.2",
42-
"codecov": "^3.0.2",
43-
"danger": "^7.0.14",
42+
"codecov": "^3.3.0",
43+
"danger": "^7.1.3",
4444
"danger-plugin-tslint": "^2.0.0",
45-
"jest": "^24.5.0",
46-
"lerna": "3.13.1",
47-
"mocha": "^6.0.2",
45+
"jest": "^24.7.1",
46+
"lerna": "3.13.4",
47+
"mocha": "^6.1.4",
4848
"npm-run-all": "^4.1.2",
49-
"prettier": "^1.14.0",
49+
"prettier": "^1.17.0",
5050
"prettier-check": "^2.0.0",
51-
"replace-in-file": "^3.4.4",
51+
"replace-in-file": "^4.0.0",
5252
"rimraf": "^2.6.3",
53-
"sinon": "^7.2.7",
54-
"ts-jest": "^24.0.0",
55-
"tslint": "^5.14.0",
53+
"sinon": "^7.3.2",
54+
"ts-jest": "^24.0.2",
55+
"tslint": "^5.16.0",
5656
"typedoc": "^0.14.2",
57-
"typescript": "^3.3.3333",
57+
"typescript": "^3.4.5",
5858
"typescript-tslint-plugin": "^0.3.1"
5959
}
6060
}

packages/browser/.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
!/dist/**/*
33
!/build/**/*
44
!/esm/**/*
5+
*.tsbuildinfo

packages/browser/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/browser",
3-
"version": "5.1.3",
3+
"version": "5.2.0-beta.0",
44
"description": "Official Sentry SDK for browsers",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
@@ -16,17 +16,17 @@
1616
"access": "public"
1717
},
1818
"dependencies": {
19-
"@sentry/core": "5.1.2",
20-
"@sentry/types": "5.1.0",
21-
"@sentry/utils": "5.1.2",
19+
"@sentry/core": "5.2.0-beta.0",
20+
"@sentry/types": "5.2.0-beta.0",
21+
"@sentry/utils": "5.2.0-beta.0",
2222
"tslib": "^1.9.3"
2323
},
2424
"devDependencies": {
2525
"@types/md5": "2.1.33",
2626
"chai": "^4.1.2",
27-
"jest": "^24.5.0",
28-
"jsdom": "^14.0.0",
29-
"karma": "^4.0.1",
27+
"jest": "^24.7.1",
28+
"jsdom": "^15.0.0",
29+
"karma": "^4.1.0",
3030
"karma-chai": "^0.1.0",
3131
"karma-chrome-launcher": "^2.2.0",
3232
"karma-failed-reporter": "0.0.3",
@@ -39,19 +39,19 @@
3939
"karma-typescript": "^4.0.0",
4040
"karma-typescript-es6-transform": "^4.0.0",
4141
"npm-run-all": "^4.1.2",
42-
"prettier": "^1.16.4",
42+
"prettier": "^1.17.0",
4343
"prettier-check": "^2.0.0",
4444
"rimraf": "^2.6.3",
45-
"rollup": "^1.6.0",
46-
"rollup-plugin-commonjs": "^9.2.1",
45+
"rollup": "^1.10.1",
46+
"rollup-plugin-commonjs": "^9.3.4",
4747
"rollup-plugin-license": "^0.8.1",
48-
"rollup-plugin-node-resolve": "^4.0.1",
48+
"rollup-plugin-node-resolve": "^4.2.3",
4949
"rollup-plugin-terser": "^4.0.4",
50-
"rollup-plugin-typescript2": "^0.20.1",
51-
"sinon": "^7.2.7",
52-
"tslint": "^5.14.0",
53-
"typescript": "^3.3.3333",
54-
"webpack": "^4.29.6"
50+
"rollup-plugin-typescript2": "^0.21.0",
51+
"sinon": "^7.3.2",
52+
"tslint": "^5.16.0",
53+
"typescript": "^3.4.5",
54+
"webpack": "^4.30.0"
5555
},
5656
"scripts": {
5757
"build": "run-s build:dist build:esm build:bundle",

packages/browser/rollup.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ const plugins = [
4343
include: ['*.ts+(|x)', '**/*.ts+(|x)', '../**/*.ts+(|x)'],
4444
}),
4545
resolve({
46-
module: true,
47-
browser: false,
48-
modulesOnly: false,
46+
mainFields: ['module'],
4947
}),
5048
commonjs(),
5149
];

packages/browser/src/sdk.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export function onLoad(callback: () => void): void {
124124
*
125125
* @param timeout Maximum time in ms the client should wait.
126126
*/
127-
export async function flush(timeout?: number): Promise<boolean> {
127+
export function flush(timeout?: number): Promise<boolean> {
128128
const client = getCurrentHub().getClient<BrowserClient>();
129129
if (client) {
130130
return client.flush(timeout);
@@ -138,7 +138,7 @@ export async function flush(timeout?: number): Promise<boolean> {
138138
*
139139
* @param timeout Maximum time in ms the client should wait.
140140
*/
141-
export async function close(timeout?: number): Promise<boolean> {
141+
export function close(timeout?: number): Promise<boolean> {
142142
const client = getCurrentHub().getClient<BrowserClient>();
143143
if (client) {
144144
return client.close(timeout);

0 commit comments

Comments
 (0)