Skip to content

Commit 975f6eb

Browse files
Merge remote-tracking branch 'origin/kw-update-profile-types-with-native' into kw-update-profile-types-with-native
2 parents 3a3ac47 + 3202825 commit 975f6eb

File tree

58 files changed

+426
-209
lines changed

Some content is hidden

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

58 files changed

+426
-209
lines changed

.craft.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ targets:
6363
- name: npm
6464
id: '@sentry/vercel-edge'
6565
includeNames: /^sentry-vercel-edge-\d.*\.tgz$/
66+
- name: npm
67+
id: '@sentry/deno'
68+
includeNames: /^sentry-deno-\d.*\.tgz$/
6669

6770
## 5. Node-based Packages
6871
- name: npm

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ jobs:
122122
- *shared
123123
- 'packages/node/**'
124124
- 'packages/node-integration-tests/**'
125+
deno:
126+
- *shared
127+
- *browser
128+
- 'packages/deno/**'
125129
any_code:
126130
- '!**/*.md'
127131
@@ -135,6 +139,7 @@ jobs:
135139
changed_ember: ${{ steps.changed.outputs.ember }}
136140
changed_remix: ${{ steps.changed.outputs.remix }}
137141
changed_node: ${{ steps.changed.outputs.node }}
142+
changed_deno: ${{ steps.changed.outputs.deno }}
138143
changed_browser: ${{ steps.changed.outputs.browser }}
139144
changed_browser_integration: ${{ steps.changed.outputs.browser_integration }}
140145
changed_any_code: ${{ steps.changed.outputs.any_code }}
@@ -422,6 +427,7 @@ jobs:
422427
job_deno_unit_tests:
423428
name: Deno Unit Tests
424429
needs: [job_get_metadata, job_build]
430+
if: needs.job_get_metadata.outputs.changed_deno == 'true' || github.event_name != 'pull_request'
425431
timeout-minutes: 10
426432
runs-on: ubuntu-20.04
427433
strategy:

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@
44

55
- "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott
66

7+
## 7.74.1
8+
9+
- chore(astro): Add `astro-integration` keyword (#9265)
10+
- fix(core): Narrow filters for health check transactions (#9257)
11+
- fix(nextjs): Fix HMR by inserting new entrypoints at the end (#9267)
12+
- fix(nextjs): Fix resolution of request async storage module (#9259)
13+
- fix(node-experimental): Guard against missing `fetch` (#9275)
14+
- fix(remix): Update `defer` injection logic. (#9242)
15+
- fix(tracing-internal): Parameterize express middleware parameters (#8668)
16+
- fix(utils): Move Node specific ANR impl. out of utils (#9258)
17+
18+
Work in this release contributed by @LubomirIgonda1. Thank you for your contribution!
19+
720
## 7.74.0
821

922
### Important Changes

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "7.74.0",
3+
"version": "7.74.1",
44
"npmClient": "yarn"
55
}

packages/angular-ivy/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/angular-ivy",
3-
"version": "7.74.0",
3+
"version": "7.74.1",
44
"description": "Official Sentry SDK for Angular with full Ivy Support",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular-ivy",
@@ -21,9 +21,9 @@
2121
"rxjs": "^6.5.5 || ^7.x"
2222
},
2323
"dependencies": {
24-
"@sentry/browser": "7.74.0",
25-
"@sentry/types": "7.74.0",
26-
"@sentry/utils": "7.74.0",
24+
"@sentry/browser": "7.74.1",
25+
"@sentry/types": "7.74.1",
26+
"@sentry/utils": "7.74.1",
2727
"tslib": "^2.4.1"
2828
},
2929
"devDependencies": {

packages/angular/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/angular",
3-
"version": "7.74.0",
3+
"version": "7.74.1",
44
"description": "Official Sentry SDK for Angular",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
@@ -21,9 +21,9 @@
2121
"rxjs": "^6.5.5 || ^7.x"
2222
},
2323
"dependencies": {
24-
"@sentry/browser": "7.74.0",
25-
"@sentry/types": "7.74.0",
26-
"@sentry/utils": "7.74.0",
24+
"@sentry/browser": "7.74.1",
25+
"@sentry/types": "7.74.1",
26+
"@sentry/utils": "7.74.1",
2727
"tslib": "^2.4.1"
2828
},
2929
"devDependencies": {

packages/astro/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/astro",
3-
"version": "7.74.0",
3+
"version": "7.74.1",
44
"description": "Official Sentry SDK for Astro",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/astro",
@@ -37,11 +37,11 @@
3737
"astro": "3.x"
3838
},
3939
"dependencies": {
40-
"@sentry/browser": "7.74.0",
41-
"@sentry/core": "7.74.0",
42-
"@sentry/node": "7.74.0",
43-
"@sentry/types": "7.74.0",
44-
"@sentry/utils": "7.74.0",
40+
"@sentry/browser": "7.74.1",
41+
"@sentry/core": "7.74.1",
42+
"@sentry/node": "7.74.1",
43+
"@sentry/types": "7.74.1",
44+
"@sentry/utils": "7.74.1",
4545
"@sentry/vite-plugin": "^2.8.0"
4646
},
4747
"devDependencies": {

packages/astro/src/integration/snippets.ts

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function buildClientSnippet(options: SentryOptions): string {
1616
1717
Sentry.init({
1818
${buildCommonInitOptions(options)}
19-
integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()],
19+
integrations: [${buildClientIntegrations(options)}],
2020
replaysSessionSampleRate: ${options.replaysSessionSampleRate ?? 0.1},
2121
replaysOnErrorSampleRate: ${options.replaysOnErrorSampleRate ?? 1.0},
2222
});`;
@@ -43,3 +43,29 @@ const buildCommonInitOptions = (options: SentryOptions): string => `dsn: ${
4343
tracesSampleRate: ${options.tracesSampleRate ?? 1.0},${
4444
options.sampleRate ? `\n sampleRate: ${options.sampleRate},` : ''
4545
}`;
46+
47+
/**
48+
* We don't include the `BrowserTracing` integration if the tracesSampleRate is set to 0.
49+
* Likewise, we don't include the `Replay` integration if the replaysSessionSampleRate
50+
* and replaysOnErrorSampleRate are set to 0.
51+
*
52+
* This way, we avoid unnecessarily adding the integrations and thereby enable tree shaking of the integrations.
53+
*/
54+
const buildClientIntegrations = (options: SentryOptions): string => {
55+
const integrations: string[] = [];
56+
57+
if (options.tracesSampleRate == null || options.tracesSampleRate) {
58+
integrations.push('new Sentry.BrowserTracing()');
59+
}
60+
61+
if (
62+
options.replaysSessionSampleRate == null ||
63+
options.replaysSessionSampleRate ||
64+
options.replaysOnErrorSampleRate == null ||
65+
options.replaysOnErrorSampleRate
66+
) {
67+
integrations.push('new Sentry.Replay()');
68+
}
69+
70+
return integrations.join(', ');
71+
};

packages/astro/test/integration/snippets.test.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,42 @@ describe('buildClientSnippet', () => {
4949
});"
5050
`);
5151
});
52+
53+
it('does not include BrowserTracing if tracesSampleRate is 0', () => {
54+
const snippet = buildClientSnippet({ tracesSampleRate: 0 });
55+
expect(snippet).toMatchInlineSnapshot(`
56+
"import * as Sentry from \\"@sentry/astro\\";
57+
58+
Sentry.init({
59+
dsn: import.meta.env.PUBLIC_SENTRY_DSN,
60+
debug: false,
61+
environment: import.meta.env.PUBLIC_VERCEL_ENV,
62+
release: import.meta.env.PUBLIC_VERCEL_GIT_COMMIT_SHA,
63+
tracesSampleRate: 0,
64+
integrations: [new Sentry.Replay()],
65+
replaysSessionSampleRate: 0.1,
66+
replaysOnErrorSampleRate: 1,
67+
});"
68+
`);
69+
});
70+
});
71+
72+
it('does not include Replay if replay sample ratest are 0', () => {
73+
const snippet = buildClientSnippet({ replaysSessionSampleRate: 0, replaysOnErrorSampleRate: 0 });
74+
expect(snippet).toMatchInlineSnapshot(`
75+
"import * as Sentry from \\"@sentry/astro\\";
76+
77+
Sentry.init({
78+
dsn: import.meta.env.PUBLIC_SENTRY_DSN,
79+
debug: false,
80+
environment: import.meta.env.PUBLIC_VERCEL_ENV,
81+
release: import.meta.env.PUBLIC_VERCEL_GIT_COMMIT_SHA,
82+
tracesSampleRate: 1,
83+
integrations: [new Sentry.BrowserTracing()],
84+
replaysSessionSampleRate: 0,
85+
replaysOnErrorSampleRate: 0,
86+
});"
87+
`);
5288
});
5389

5490
describe('buildServerSnippet', () => {

packages/browser-integration-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "7.74.0",
3+
"version": "7.74.1",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {

packages/browser/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/browser",
3-
"version": "7.74.0",
3+
"version": "7.74.1",
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",
@@ -23,15 +23,15 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"@sentry-internal/tracing": "7.74.0",
27-
"@sentry/core": "7.74.0",
28-
"@sentry/replay": "7.74.0",
29-
"@sentry/types": "7.74.0",
30-
"@sentry/utils": "7.74.0",
26+
"@sentry-internal/tracing": "7.74.1",
27+
"@sentry/core": "7.74.1",
28+
"@sentry/replay": "7.74.1",
29+
"@sentry/types": "7.74.1",
30+
"@sentry/utils": "7.74.1",
3131
"tslib": "^2.4.1 || ^1.9.3"
3232
},
3333
"devDependencies": {
34-
"@sentry-internal/integration-shims": "7.74.0",
34+
"@sentry-internal/integration-shims": "7.74.1",
3535
"@types/md5": "2.1.33",
3636
"btoa": "^1.2.1",
3737
"chai": "^4.1.2",

packages/bun/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/bun",
3-
"version": "7.74.0",
3+
"version": "7.74.1",
44
"description": "Official Sentry SDK for bun",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/bun",
@@ -23,10 +23,10 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"@sentry/core": "7.74.0",
27-
"@sentry/node": "7.74.0",
28-
"@sentry/types": "7.74.0",
29-
"@sentry/utils": "7.74.0"
26+
"@sentry/core": "7.74.1",
27+
"@sentry/node": "7.74.1",
28+
"@sentry/types": "7.74.1",
29+
"@sentry/utils": "7.74.1"
3030
},
3131
"devDependencies": {
3232
"bun-types": "latest"

packages/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/core",
3-
"version": "7.74.0",
3+
"version": "7.74.1",
44
"description": "Base implementation for all Sentry JavaScript SDKs",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
@@ -23,8 +23,8 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"@sentry/types": "7.74.0",
27-
"@sentry/utils": "7.74.0",
26+
"@sentry/types": "7.74.1",
27+
"@sentry/utils": "7.74.1",
2828
"tslib": "^2.4.1 || ^1.9.3"
2929
},
3030
"scripts": {

packages/core/src/session.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ export function updateSession(session: Session, context: SessionContext = {}): v
5757

5858
session.timestamp = context.timestamp || timestampInSeconds();
5959

60+
if (context.abnormal_mechanism) {
61+
session.abnormal_mechanism = context.abnormal_mechanism;
62+
}
63+
6064
if (context.ignoreDuration) {
6165
session.ignoreDuration = context.ignoreDuration;
6266
}
@@ -143,6 +147,7 @@ function sessionToJSON(session: Session): SerializedSession {
143147
errors: session.errors,
144148
did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,
145149
duration: session.duration,
150+
abnormal_mechanism: session.abnormal_mechanism,
146151
attrs: {
147152
release: session.release,
148153
environment: session.environment,

packages/core/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const SDK_VERSION = '7.74.0';
1+
export const SDK_VERSION = '7.74.1';

packages/deno/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build-types

packages/deno/package.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/deno",
3-
"version": "7.74.0",
3+
"version": "7.74.1",
44
"description": "Official Sentry SDK for Deno",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/deno",
@@ -9,15 +9,19 @@
99
"main": "build/index.js",
1010
"module": "build/index.js",
1111
"types": "build/index.d.ts",
12-
"private": true,
1312
"publishConfig": {
1413
"access": "public"
1514
},
15+
"files": [
16+
"index.js",
17+
"index.js.map",
18+
"index.d.ts"
19+
],
1620
"dependencies": {
17-
"@sentry/browser": "7.74.0",
18-
"@sentry/core": "7.74.0",
19-
"@sentry/types": "7.74.0",
20-
"@sentry/utils": "7.74.0",
21+
"@sentry/browser": "7.74.1",
22+
"@sentry/core": "7.74.1",
23+
"@sentry/types": "7.74.1",
24+
"@sentry/utils": "7.74.1",
2125
"lru_map": "^0.3.3"
2226
},
2327
"devDependencies": {
@@ -34,8 +38,9 @@
3438
"build:types": "run-s deno-types build:types:tsc build:types:bundle",
3539
"build:types:tsc": "tsc -p tsconfig.types.json",
3640
"build:types:bundle": "rollup -c rollup.types.config.js",
41+
"build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
3742
"circularDepCheck": "madge --circular src/index.ts",
38-
"clean": "rimraf build coverage",
43+
"clean": "rimraf build build-types coverage",
3944
"prefix": "yarn deno-types",
4045
"fix": "run-s fix:eslint fix:prettier",
4146
"fix:eslint": "eslint . --format stylish --fix",
@@ -48,7 +53,8 @@
4853
"test": "run-s deno-types install:deno test:types test:unit",
4954
"test:types": "deno check ./build/index.js",
5055
"test:unit": "deno test --allow-read --allow-run",
51-
"test:unit:update": "deno test --allow-read --allow-write --allow-run -- --update"
56+
"test:unit:update": "deno test --allow-read --allow-write --allow-run -- --update",
57+
"yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push"
5258
},
5359
"volta": {
5460
"extends": "../../package.json"

packages/deno/rollup.types.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
// @ts-check
12
import dts from 'rollup-plugin-dts';
3+
import { defineConfig } from 'rollup';
24

3-
export default {
4-
input: './build/index.d.ts',
5+
export default defineConfig({
6+
input: './build-types/index.d.ts',
57
output: [{ file: 'build/index.d.ts', format: 'es' }],
68
plugins: [
79
dts({ respectExternal: true }),
@@ -14,4 +16,4 @@ export default {
1416
},
1517
},
1618
],
17-
};
19+
});

packages/deno/tsconfig.types.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"declaration": true,
5-
"declarationMap": true,
5+
"declarationMap": false,
66
"emitDeclarationOnly": true,
7-
"outDir": "build"
7+
"outDir": "build-types"
88
}
99
}

0 commit comments

Comments
 (0)