Skip to content

Commit 8fedecc

Browse files
committed
resolve merge conflict
2 parents a37035c + 11e0c2d commit 8fedecc

File tree

77 files changed

+541
-233
lines changed

Some content is hidden

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

77 files changed

+541
-233
lines changed

CHANGELOG.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44

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

7-
## 7.80.0-alpha.0
8-
9-
- feat(utils): Prioritize Component name attributes over HTML Tree String (#9496)
7+
## 7.80.1
8+
9+
- fix(astro): Adjust Vite plugin config to upload server source maps (#9541)
10+
- fix(nextjs): Add tracing extensions in all serverside wrappers (#9537)
11+
- fix(nextjs): Fix serverside transaction names on Windows (#9526)
12+
- fix(node): Fix tRPC middleware typing (#9540)
13+
- fix(replay): Add additional safeguards for capturing network bodies (#9506)
14+
- fix(tracing): Update prisma span to be `db.prisma` (#9512)
1015

1116
## 7.80.0
1217

MIGRATION.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ npx @sentry/migr8@latest
88

99
This will let you select which updates to run, and automatically update your code. Make sure to still review all code changes!
1010

11+
## Deprecate `extractTraceParentData` export from `@sentry/core` & downstream packages
12+
13+
Instead, import this directly from `@sentry/utils`.
14+
15+
Generally, in most cases you should probably use `continueTrace` instead, which abstracts this away from you and handles scope propagation for you.
16+
1117
## Deprecate `timestampWithMs` export - #7878
1218

1319
The `timestampWithMs` util is deprecated in favor of using `timestampInSeconds`.

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.80.0",
3+
"version": "7.80.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.80.0",
3+
"version": "7.80.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.80.0",
25-
"@sentry/types": "7.80.0",
26-
"@sentry/utils": "7.80.0",
24+
"@sentry/browser": "7.80.1",
25+
"@sentry/types": "7.80.1",
26+
"@sentry/utils": "7.80.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.80.0",
3+
"version": "7.80.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.80.0",
25-
"@sentry/types": "7.80.0",
26-
"@sentry/utils": "7.80.0",
24+
"@sentry/browser": "7.80.1",
25+
"@sentry/types": "7.80.1",
26+
"@sentry/utils": "7.80.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.80.0",
3+
"version": "7.80.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.80.0",
41-
"@sentry/core": "7.80.0",
42-
"@sentry/node": "7.80.0",
43-
"@sentry/types": "7.80.0",
44-
"@sentry/utils": "7.80.0",
40+
"@sentry/browser": "7.80.1",
41+
"@sentry/core": "7.80.1",
42+
"@sentry/node": "7.80.1",
43+
"@sentry/types": "7.80.1",
44+
"@sentry/utils": "7.80.1",
4545
"@sentry/vite-plugin": "^2.8.0"
4646
},
4747
"devDependencies": {

packages/astro/src/index.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export {
1616
withMonitor,
1717
configureScope,
1818
createTransport,
19+
// eslint-disable-next-line deprecation/deprecation
1920
extractTraceparentData,
2021
getActiveTransaction,
2122
getHubFromCarrier,

packages/astro/src/integration/index.ts

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-console */
22
import { sentryVitePlugin } from '@sentry/vite-plugin';
3-
import type { AstroIntegration } from 'astro';
3+
import type { AstroConfig, AstroIntegration } from 'astro';
44
import * as fs from 'fs';
55
import * as path from 'path';
66

@@ -13,7 +13,8 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => {
1313
return {
1414
name: PKG_NAME,
1515
hooks: {
16-
'astro:config:setup': async ({ updateConfig, injectScript }) => {
16+
// eslint-disable-next-line complexity
17+
'astro:config:setup': async ({ updateConfig, injectScript, config }) => {
1718
// The third param here enables loading of all env vars, regardless of prefix
1819
// see: https://main.vitejs.dev/config/#using-environment-variables-in-config
1920

@@ -40,6 +41,10 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => {
4041
project: uploadOptions.project ?? env.SENTRY_PROJECT,
4142
authToken: uploadOptions.authToken ?? env.SENTRY_AUTH_TOKEN,
4243
telemetry: uploadOptions.telemetry ?? true,
44+
sourcemaps: {
45+
assets: [getSourcemapsAssetsGlob(config)],
46+
},
47+
debug: options.debug ?? false,
4348
}),
4449
],
4550
},
@@ -79,3 +84,17 @@ function findDefaultSdkInitFile(type: 'server' | 'client'): string | undefined {
7984
.map(ext => path.resolve(path.join(process.cwd(), `sentry.${type}.config.${ext}`)))
8085
.find(filename => fs.existsSync(filename));
8186
}
87+
88+
function getSourcemapsAssetsGlob(config: AstroConfig): string {
89+
// paths are stored as "file://" URLs
90+
const outDirPathname = config.outDir && path.resolve(config.outDir.pathname);
91+
const rootDirName = path.resolve((config.root && config.root.pathname) || process.cwd());
92+
93+
if (outDirPathname) {
94+
const relativePath = path.relative(rootDirName, outDirPathname);
95+
return `${relativePath}/**/*`;
96+
}
97+
98+
// fallback to default output dir
99+
return 'dist/**/*';
100+
}

packages/astro/test/integration/index.test.ts

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ process.env = {
1414
SENTRY_AUTH_TOKEN: 'my-token',
1515
};
1616

17+
const updateConfig = vi.fn();
18+
const injectScript = vi.fn();
19+
const config = {
20+
root: new URL('file://path/to/project'),
21+
outDir: new URL('file://path/to/project/out'),
22+
};
23+
1724
describe('sentryAstro integration', () => {
1825
afterEach(() => {
1926
vi.clearAllMocks();
@@ -28,12 +35,10 @@ describe('sentryAstro integration', () => {
2835
const integration = sentryAstro({
2936
sourceMapsUploadOptions: { enabled: true, org: 'my-org', project: 'my-project', telemetry: false },
3037
});
31-
const updateConfig = vi.fn();
32-
const injectScript = vi.fn();
3338

3439
expect(integration.hooks['astro:config:setup']).toBeDefined();
3540
// @ts-expect-error - the hook exists and we only need to pass what we actually use
36-
await integration.hooks['astro:config:setup']({ updateConfig, injectScript });
41+
await integration.hooks['astro:config:setup']({ updateConfig, injectScript, config });
3742

3843
expect(updateConfig).toHaveBeenCalledTimes(1);
3944
expect(updateConfig).toHaveBeenCalledWith({
@@ -51,32 +56,52 @@ describe('sentryAstro integration', () => {
5156
org: 'my-org',
5257
project: 'my-project',
5358
telemetry: false,
59+
debug: false,
60+
sourcemaps: {
61+
assets: ['out/**/*'],
62+
},
63+
});
64+
});
65+
66+
it('falls back to default output dir, if out and root dir are not available', async () => {
67+
const integration = sentryAstro({
68+
sourceMapsUploadOptions: { enabled: true, org: 'my-org', project: 'my-project', telemetry: false },
69+
});
70+
// @ts-expect-error - the hook exists and we only need to pass what we actually use
71+
await integration.hooks['astro:config:setup']({ updateConfig, injectScript, config: {} });
72+
73+
expect(sentryVitePluginSpy).toHaveBeenCalledTimes(1);
74+
expect(sentryVitePluginSpy).toHaveBeenCalledWith({
75+
authToken: 'my-token',
76+
org: 'my-org',
77+
project: 'my-project',
78+
telemetry: false,
79+
debug: false,
80+
sourcemaps: {
81+
assets: ['dist/**/*'],
82+
},
5483
});
5584
});
5685

5786
it("doesn't enable source maps if `sourceMapsUploadOptions.enabled` is `false`", async () => {
5887
const integration = sentryAstro({
5988
sourceMapsUploadOptions: { enabled: false },
6089
});
61-
const updateConfig = vi.fn();
62-
const injectScript = vi.fn();
6390

6491
expect(integration.hooks['astro:config:setup']).toBeDefined();
6592
// @ts-expect-error - the hook exists and we only need to pass what we actually use
66-
await integration.hooks['astro:config:setup']({ updateConfig, injectScript });
93+
await integration.hooks['astro:config:setup']({ updateConfig, injectScript, config });
6794

6895
expect(updateConfig).toHaveBeenCalledTimes(0);
6996
expect(sentryVitePluginSpy).toHaveBeenCalledTimes(0);
7097
});
7198

7299
it('injects client and server init scripts', async () => {
73100
const integration = sentryAstro({});
74-
const updateConfig = vi.fn();
75-
const injectScript = vi.fn();
76101

77102
expect(integration.hooks['astro:config:setup']).toBeDefined();
78103
// @ts-expect-error - the hook exists and we only need to pass what we actually use
79-
await integration.hooks['astro:config:setup']({ updateConfig, injectScript });
104+
await integration.hooks['astro:config:setup']({ updateConfig, injectScript, config });
80105

81106
expect(injectScript).toHaveBeenCalledTimes(2);
82107
expect(injectScript).toHaveBeenCalledWith('page', expect.stringContaining('Sentry.init'));
@@ -89,12 +114,9 @@ describe('sentryAstro integration', () => {
89114
serverInitPath: 'my-server-init-path.js',
90115
});
91116

92-
const updateConfig = vi.fn();
93-
const injectScript = vi.fn();
94-
95117
expect(integration.hooks['astro:config:setup']).toBeDefined();
96118
// @ts-expect-error - the hook exists and we only need to pass what we actually use
97-
await integration.hooks['astro:config:setup']({ updateConfig, injectScript });
119+
await integration.hooks['astro:config:setup']({ updateConfig, injectScript, config });
98120

99121
expect(injectScript).toHaveBeenCalledTimes(2);
100122
expect(injectScript).toHaveBeenCalledWith('page', expect.stringContaining('my-client-init-path.js'));

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.80.0",
3+
"version": "7.80.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.80.0",
3+
"version": "7.80.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,14 +23,14 @@
2323
"access": "public"
2424
},
2525
"dependencies": {
26-
"@sentry-internal/tracing": "7.80.0",
27-
"@sentry/core": "7.80.0",
28-
"@sentry/replay": "7.80.0",
29-
"@sentry/types": "7.80.0",
30-
"@sentry/utils": "7.80.0"
26+
"@sentry-internal/tracing": "7.80.1",
27+
"@sentry/core": "7.80.1",
28+
"@sentry/replay": "7.80.1",
29+
"@sentry/types": "7.80.1",
30+
"@sentry/utils": "7.80.1"
3131
},
3232
"devDependencies": {
33-
"@sentry-internal/integration-shims": "7.80.0",
33+
"@sentry-internal/integration-shims": "7.80.1",
3434
"@types/md5": "2.1.33",
3535
"btoa": "^1.2.1",
3636
"chai": "^4.1.2",

packages/browser/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export type { RequestInstrumentationOptions } from '@sentry-internal/tracing';
4242
export {
4343
addTracingExtensions,
4444
setMeasurement,
45+
// eslint-disable-next-line deprecation/deprecation
4546
extractTraceparentData,
4647
getActiveTransaction,
4748
spanStatusfromHttpCode,

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.80.0",
3+
"version": "7.80.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.80.0",
27-
"@sentry/node": "7.80.0",
28-
"@sentry/types": "7.80.0",
29-
"@sentry/utils": "7.80.0"
26+
"@sentry/core": "7.80.1",
27+
"@sentry/node": "7.80.1",
28+
"@sentry/types": "7.80.1",
29+
"@sentry/utils": "7.80.1"
3030
},
3131
"devDependencies": {
3232
"bun-types": "latest"

packages/bun/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export {
3333
close,
3434
configureScope,
3535
createTransport,
36+
// eslint-disable-next-line deprecation/deprecation
3637
extractTraceparentData,
3738
flush,
3839
getActiveTransaction,

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.80.0",
3+
"version": "7.80.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.80.0",
27-
"@sentry/utils": "7.80.0"
26+
"@sentry/types": "7.80.1",
27+
"@sentry/utils": "7.80.1"
2828
},
2929
"scripts": {
3030
"build": "run-p build:transpile build:types",

packages/core/src/tracing/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export { IdleTransaction, TRACING_DEFAULTS } from './idletransaction';
33
export type { BeforeFinishCallback } from './idletransaction';
44
export { Span, spanStatusfromHttpCode } from './span';
55
export { Transaction } from './transaction';
6+
// eslint-disable-next-line deprecation/deprecation
67
export { extractTraceparentData, getActiveTransaction } from './utils';
78
// eslint-disable-next-line deprecation/deprecation
89
export { SpanStatus } from './spanstatus';

0 commit comments

Comments
 (0)