Skip to content
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
2 changes: 1 addition & 1 deletion .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
],
"deny": []
}
}
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
packages/browser/test/loader.js
packages/replay-worker/examples/worker.min.js
dev-packages/browser-integration-tests/fixtures
**/test.ts-snapshots/**
7 changes: 0 additions & 7 deletions .prettierrc.json

This file was deleted.

6 changes: 0 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

We will follow up with docs how to set up the SDK soon.
For now, If you're on SvelteKit version `2.31.0` or newer, you can easily opt into the new feature:

1. Enable [experimental tracing and instrumentation support](https://svelte.dev/docs/kit/observability) in `svelte.config.js`:
2. Move your `Sentry.init()` call from `src/hooks.server.(js|ts)` to the new `instrumentation.server.(js|ts)` file:

Expand Down Expand Up @@ -650,7 +649,6 @@ Work in this release was contributed by @0xbad0c0d3 and @alSergey. Thank you for
- **feat(nuxt): Add Cloudflare Nitro plugin ([#15597](https://github.com/getsentry/sentry-javascript/pull/15597))**

A Nitro plugin for `@sentry/nuxt` which initializes Sentry when deployed to Cloudflare (`cloudflare-pages` preset).

1. Remove the previous server config file: `sentry.server.config.ts`
2. Add a plugin in `server/plugins` (e.g. `server/plugins/sentry-cloudflare-setup.ts`)
3. Add this code in your plugin file
Expand Down Expand Up @@ -1215,7 +1213,6 @@ This PR adds trace propagation to `@sentry/react-router` by providing utilities
- **Logging Improvements**

Sentry is adding support for [structured logging](https://github.com/getsentry/sentry-javascript/discussions/15916). In this release we've made a variety of improvements to logging functionality in the Sentry SDKs.

- feat(node): Add server.address to nodejs logs ([#16006](https://github.com/getsentry/sentry-javascript/pull/16006))
- feat(core): Add sdk name and version to logs ([#16005](https://github.com/getsentry/sentry-javascript/pull/16005))
- feat(core): Add sentry origin attribute to console logs integration ([#15998](https://github.com/getsentry/sentry-javascript/pull/15998))
Expand Down Expand Up @@ -1264,7 +1261,6 @@ Work in this release was contributed by @Page- and @Fryuni. Thank you for your c
### Important Changes

- **feat: Add support for logs**

- feat(node): Add logging public APIs to Node SDKs ([#15764](https://github.com/getsentry/sentry-javascript/pull/15764))
- feat(core): Add support for `beforeSendLog` ([#15814](https://github.com/getsentry/sentry-javascript/pull/15814))
- feat(core): Add support for parameterizing logs ([#15812](https://github.com/getsentry/sentry-javascript/pull/15812))
Expand Down Expand Up @@ -1314,13 +1310,11 @@ Work in this release was contributed by @Page- and @Fryuni. Thank you for your c
```

The result will be an object with the following properties:

- `"no-client-active"`: There was no active client when the function was called. This possibly means that the SDK was not initialized yet.
- `"sentry-unreachable"`: The Sentry SaaS servers were not reachable. This likely means that there is an ad blocker active on the page or that there are other connection issues.
- `undefined`: The SDK is working as expected.

- **SDK Tracing Performance Improvements for Node SDKs**

- feat: Stop using `dropUndefinedKeys` ([#15796](https://github.com/getsentry/sentry-javascript/pull/15796))
- feat(node): Only add span listeners for instrumentation when used ([#15802](https://github.com/getsentry/sentry-javascript/pull/15802))
- ref: Avoid `dropUndefinedKeys` for `spanToJSON` calls ([#15792](https://github.com/getsentry/sentry-javascript/pull/15792))
Expand Down
1 change: 0 additions & 1 deletion dev-packages/browser-integration-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ occur while writing tests for Sentry Browser SDK.

Before running, a page for each test case is built under the case folder inside `dist`. If a page build is failed,
it's recommended to check:

- If both default `template.hbs` and `init.js` are defined for the test group.
- If a `subject.js` is defined for the test case.
- If either of `init.js` or `subject.js` contain non-browser code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,15 @@ sentryTest('allows to ignore mutations via `ignoreMutations` option', async ({ g
const requests = await requestsPromise;

// All transform mutatinos are ignored and not captured
const transformMutations = requests.replayRecordingSnapshots.filter(
item =>
(item.data as mutationData)?.attributes?.some(
attr => attr.attributes['style'] && attr.attributes['class'] !== 'moved',
),
const transformMutations = requests.replayRecordingSnapshots.filter(item =>
(item.data as mutationData)?.attributes?.some(
attr => attr.attributes['style'] && attr.attributes['class'] !== 'moved',
),
);

// Should capture the final class mutation
const classMutations = requests.replayRecordingSnapshots.filter(
item => (item.data as mutationData)?.attributes?.some(attr => attr.attributes['class']),
const classMutations = requests.replayRecordingSnapshots.filter(item =>
(item.data as mutationData)?.attributes?.some(attr => attr.attributes['class']),
);

expect(transformMutations).toEqual([]);
Expand Down
11 changes: 4 additions & 7 deletions dev-packages/browser-integration-tests/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,10 @@ export const countEnvelopes = async (

page.on('request', requestHandler);

setTimeout(
() => {
page.off('request', requestHandler);
resolve(reqCount);
},
options?.timeout || 1000,
);
setTimeout(() => {
page.off('request', requestHandler);
resolve(reqCount);
}, options?.timeout || 1000);
});

if (options?.url) {
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/cloudflare-integration-tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
// Although this seems wrong to include `DOM` here, it's necessary to make
// global fetch available in tests in lower Node versions.
"lib": ["ES2020"],
"esModuleInterop": true,
"esModuleInterop": true
}
}
6 changes: 3 additions & 3 deletions dev-packages/e2e-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ for it to work with both regular and prerelease versions:
"scripts": {
"test": "echo \"Hello world!\"",
"test:build": "pnpm install",
"test:assert": "pnpm test"
"test:assert": "pnpm test",
},
"dependencies": {
"@sentry/node": "latest || *"
}
"@sentry/node": "latest || *",
},
}
```

Expand Down
27 changes: 6 additions & 21 deletions dev-packages/e2e-tests/test-applications/angular-17/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@
"outputPath": "dist/angular-17",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -74,18 +67,10 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { SampleComponent } from '../sample-component/sample-component.components
standalone: true,
imports: [TraceModule, SampleComponent],
template: `
<app-sample-component [trace]="'sample-component'"></app-sample-component>
<app-sample-component trace></app-sample-component>
<app-sample-component [trace]="'sample-component'"></app-sample-component>
<app-sample-component trace></app-sample-component>
`,
})
@TraceClass({ name: 'ComponentTrackingComponent' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import { RouterLink } from '@angular/router';
standalone: true,
imports: [RouterLink],
template: `
<main>
<h1>Welcome to Sentry's Angular 17 E2E test app</h1>
<ul>
<li> <a id="navLink" [routerLink]="['/users', '123']">Visit User 123</a> </li>
<li> <a id="redirectLink" [routerLink]="['/redirect1']">Redirect</a> </li>
<li> <a id="cancelLink" [routerLink]="['/cancel']">Cancel</a> </li>
<li> <a id="nonExistentLink" [routerLink]="['/non-existent']">Error</a> </li>
<li> <a id="componentTracking" [routerLink]="['/component-tracking']">Component Tracking</a> </li>
</ul>
<button id="errorBtn" (click)="throwError()">Throw error</button>
</main>
`,
<main>
<h1>Welcome to Sentry's Angular 17 E2E test app</h1>
<ul>
<li><a id="navLink" [routerLink]="['/users', '123']">Visit User 123</a></li>
<li><a id="redirectLink" [routerLink]="['/redirect1']">Redirect</a></li>
<li><a id="cancelLink" [routerLink]="['/cancel']">Cancel</a></li>
<li><a id="nonExistentLink" [routerLink]="['/non-existent']">Error</a></li>
<li><a id="componentTracking" [routerLink]="['/component-tracking']">Component Tracking</a></li>
</ul>
<button id="errorBtn" (click)="throwError()">Throw error</button>
</main>
`,
})
export class HomeComponent {
throwError() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"lib": [
"ES2022",
"dom"
]
"lib": ["ES2022", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
27 changes: 6 additions & 21 deletions dev-packages/e2e-tests/test-applications/angular-18/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,10 @@
"outputPath": "dist/angular-18",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -74,18 +67,10 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.css"],
"scripts": []
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import { RouterLink } from '@angular/router';
standalone: true,
imports: [RouterLink],
template: `
<main>
<h1>Welcome to Sentry's Angular 18 E2E test app</h1>
<ul>
<li> <a id="navLink" [routerLink]="['/users', '123']">Visit User 123</a> </li>
<li> <a id="redirectLink" [routerLink]="['/redirect1']">Redirect</a> </li>
<li> <a id="cancelLink" [routerLink]="['/cancel']">Cancel</a> </li>
<li> <a id="nonExistentLink" [routerLink]="['/non-existent']">Error</a> </li>
<li> <a id="componentTracking" [routerLink]="['/component-tracking']">Component Tracking</a> </li>
</ul>
<button id="errorBtn" (click)="throwError()">Throw error</button>
</main>
`,
<main>
<h1>Welcome to Sentry's Angular 18 E2E test app</h1>
<ul>
<li><a id="navLink" [routerLink]="['/users', '123']">Visit User 123</a></li>
<li><a id="redirectLink" [routerLink]="['/redirect1']">Redirect</a></li>
<li><a id="cancelLink" [routerLink]="['/cancel']">Cancel</a></li>
<li><a id="nonExistentLink" [routerLink]="['/non-existent']">Error</a></li>
<li><a id="componentTracking" [routerLink]="['/component-tracking']">Component Tracking</a></li>
</ul>
<button id="errorBtn" (click)="throwError()">Throw error</button>
</main>
`,
})
export class HomeComponent {
throwError() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"lib": [
"ES2022",
"dom"
]
"lib": ["ES2022", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down
17 changes: 4 additions & 13 deletions dev-packages/e2e-tests/test-applications/angular-19/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@
"outputPath": "dist/angular-19",
"index": "src/index.html",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.css"
],
"styles": ["src/styles.css"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -73,20 +69,15 @@
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"assets": [
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"src/styles.css"
],
"styles": ["src/styles.css"],
"scripts": []
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { SampleComponent } from '../sample-component/sample-component.components
template: `
<app-sample-component trace="sample-component"></app-sample-component>
<app-sample-component trace></app-sample-component>
`,
`,
})
@TraceClass({ name: 'ComponentTrackingComponent' })
export class ComponentTrackingComponent implements OnInit, AfterViewInit {
Expand Down
Loading
Loading