+
+
+ )}
+ >
+ {props.children}
+
+ );
+}
diff --git a/dev-packages/e2e-tests/test-applications/solid/src/index.tsx b/dev-packages/e2e-tests/test-applications/solid/src/index.tsx
index 66773f009d1e..df121347daeb 100644
--- a/dev-packages/e2e-tests/test-applications/solid/src/index.tsx
+++ b/dev-packages/e2e-tests/test-applications/solid/src/index.tsx
@@ -1,22 +1,19 @@
/* @refresh reload */
import * as Sentry from '@sentry/solid';
-import { solidRouterBrowserTracingIntegration, withSentryRouterRouting } from '@sentry/solid/solidrouter';
-import { Router } from '@solidjs/router';
import { render } from 'solid-js/web';
+import App from './app';
import './index.css';
-import PageRoot from './pageroot';
-import { routes } from './routes';
Sentry.init({
- dsn: import.meta.env.PUBLIC_E2E_TEST_DSN,
+ dsn:
+ import.meta.env.PUBLIC_E2E_TEST_DSN ||
+ 'https://3b6c388182fb435097f41d181be2b2ba@o4504321058471936.ingest.sentry.io/4504321066008576',
debug: true,
environment: 'qa', // dynamic sampling bias to keep transactions
- integrations: [solidRouterBrowserTracingIntegration()],
+ integrations: [Sentry.browserTracingIntegration()],
release: 'e2e-test',
tunnel: 'http://localhost:3031/', // proxy server
tracesSampleRate: 1.0,
});
-const SentryRouter = withSentryRouterRouting(Router);
-
-render(() => {routes}, document.getElementById('root'));
+render(() => , document.getElementById('root'));
diff --git a/dev-packages/e2e-tests/test-applications/solid/tests/errorboundary.test.ts b/dev-packages/e2e-tests/test-applications/solid/tests/errorboundary.test.ts
index 287642424850..d192ed9cfcfd 100644
--- a/dev-packages/e2e-tests/test-applications/solid/tests/errorboundary.test.ts
+++ b/dev-packages/e2e-tests/test-applications/solid/tests/errorboundary.test.ts
@@ -3,17 +3,24 @@ import { waitForError } from '@sentry-internal/test-utils';
test('captures an exception', async ({ page }) => {
const errorEventPromise = waitForError('solid', errorEvent => {
- return !errorEvent.type && errorEvent.transaction === '/error-boundary-example';
+ return (
+ !errorEvent.type &&
+ errorEvent.exception?.values?.[0]?.value === 'Error 1 thrown from Sentry ErrorBoundary in Solid E2E test app'
+ );
});
- const [, errorEvent] = await Promise.all([page.goto('/error-boundary-example'), errorEventPromise]);
+ const [, , errorEvent] = await Promise.all([
+ page.goto('/'),
+ page.locator('#caughtErrorBtn').click(),
+ errorEventPromise,
+ ]);
expect(errorEvent).toMatchObject({
exception: {
values: [
{
- type: 'ReferenceError',
- value: 'NonExistentComponent is not defined',
+ type: 'Error',
+ value: 'Error 1 thrown from Sentry ErrorBoundary in Solid E2E test app',
mechanism: {
type: 'generic',
handled: true,
@@ -21,23 +28,30 @@ test('captures an exception', async ({ page }) => {
},
],
},
- transaction: '/error-boundary-example',
+ transaction: '/',
});
});
test('captures a second exception after resetting the boundary', async ({ page }) => {
const firstErrorEventPromise = waitForError('solid', errorEvent => {
- return !errorEvent.type && errorEvent.transaction === '/error-boundary-example';
+ return (
+ !errorEvent.type &&
+ errorEvent.exception?.values?.[0]?.value === 'Error 1 thrown from Sentry ErrorBoundary in Solid E2E test app'
+ );
});
- const [, firstErrorEvent] = await Promise.all([page.goto('/error-boundary-example'), firstErrorEventPromise]);
+ const [, , firstErrorEvent] = await Promise.all([
+ page.goto('/'),
+ page.locator('#caughtErrorBtn').click(),
+ firstErrorEventPromise,
+ ]);
expect(firstErrorEvent).toMatchObject({
exception: {
values: [
{
- type: 'ReferenceError',
- value: 'NonExistentComponent is not defined',
+ type: 'Error',
+ value: 'Error 1 thrown from Sentry ErrorBoundary in Solid E2E test app',
mechanism: {
type: 'generic',
handled: true,
@@ -45,15 +59,19 @@ test('captures a second exception after resetting the boundary', async ({ page }
},
],
},
- transaction: '/error-boundary-example',
+ transaction: '/',
});
const secondErrorEventPromise = waitForError('solid', errorEvent => {
- return !errorEvent.type && errorEvent.transaction === '/error-boundary-example';
+ return (
+ !errorEvent.type &&
+ errorEvent.exception?.values?.[0]?.value === 'Error 2 thrown from Sentry ErrorBoundary in Solid E2E test app'
+ );
});
- const [, secondErrorEvent] = await Promise.all([
+ const [, , secondErrorEvent] = await Promise.all([
page.locator('#errorBoundaryResetBtn').click(),
+ page.locator('#caughtErrorBtn').click(),
await secondErrorEventPromise,
]);
@@ -61,8 +79,8 @@ test('captures a second exception after resetting the boundary', async ({ page }
exception: {
values: [
{
- type: 'ReferenceError',
- value: 'NonExistentComponent is not defined',
+ type: 'Error',
+ value: 'Error 2 thrown from Sentry ErrorBoundary in Solid E2E test app',
mechanism: {
type: 'generic',
handled: true,
@@ -70,6 +88,6 @@ test('captures a second exception after resetting the boundary', async ({ page }
},
],
},
- transaction: '/error-boundary-example',
+ transaction: '/',
});
});
diff --git a/dev-packages/e2e-tests/test-applications/solid/tests/errors.test.ts b/dev-packages/e2e-tests/test-applications/solid/tests/errors.test.ts
index 8fb9d3d2513a..b8e2a759886a 100644
--- a/dev-packages/e2e-tests/test-applications/solid/tests/errors.test.ts
+++ b/dev-packages/e2e-tests/test-applications/solid/tests/errors.test.ts
@@ -3,7 +3,7 @@ import { waitForError } from '@sentry-internal/test-utils';
test('sends an error', async ({ page }) => {
const errorPromise = waitForError('solid', async errorEvent => {
- return !errorEvent.type && errorEvent.transaction === '/';
+ return !errorEvent.type && errorEvent.exception?.values?.[0]?.value === 'Error thrown from Solid E2E test app';
});
await Promise.all([page.goto(`/`), page.locator('#errorBtn').click()]);
diff --git a/dev-packages/e2e-tests/test-applications/solid/tests/performance.test.ts b/dev-packages/e2e-tests/test-applications/solid/tests/performance.test.ts
index f73ff4940527..a9bfbea82fb2 100644
--- a/dev-packages/e2e-tests/test-applications/solid/tests/performance.test.ts
+++ b/dev-packages/e2e-tests/test-applications/solid/tests/performance.test.ts
@@ -21,71 +21,3 @@ test('sends a pageload transaction', async ({ page }) => {
},
});
});
-
-test('sends a navigation transaction', async ({ page }) => {
- const transactionPromise = waitForTransaction('solid', async transactionEvent => {
- return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
- });
-
- await page.goto(`/`);
-
- const [, navigationTransaction] = await Promise.all([page.locator('#navLink').click(), transactionPromise]);
-
- expect(navigationTransaction).toMatchObject({
- contexts: {
- trace: {
- op: 'navigation',
- origin: 'auto.navigation.solid.solidrouter',
- },
- },
- transaction: '/user/5',
- transaction_info: {
- source: 'url',
- },
- });
-});
-
-test('updates the transaction when using the back button', async ({ page }) => {
- // Solid Router sends a `-1` navigation when using the back button.
- // The sentry solidRouterBrowserTracingIntegration tries to update such
- // transactions with the proper name once the `useLocation` hook triggers.
- const navigationTxnPromise = waitForTransaction('solid', async transactionEvent => {
- return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
- });
-
- await page.goto(`/`);
-
- const [, navigationTxn] = await Promise.all([page.locator('#navLink').click(), navigationTxnPromise]);
-
- expect(navigationTxn).toMatchObject({
- contexts: {
- trace: {
- op: 'navigation',
- origin: 'auto.navigation.solid.solidrouter',
- },
- },
- transaction: '/user/5',
- transaction_info: {
- source: 'url',
- },
- });
-
- const backNavigationTxnPromise = waitForTransaction('solid', async transactionEvent => {
- return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
- });
-
- const [, backNavigationTxn] = await Promise.all([page.goBack(), backNavigationTxnPromise]);
-
- expect(backNavigationTxn).toMatchObject({
- contexts: {
- trace: {
- op: 'navigation',
- origin: 'auto.navigation.solid.solidrouter',
- },
- },
- transaction: '/',
- transaction_info: {
- source: 'url',
- },
- });
-});
diff --git a/dev-packages/e2e-tests/verdaccio-config/config.yaml b/dev-packages/e2e-tests/verdaccio-config/config.yaml
index 26dfeb85e506..5f77ba7cccea 100644
--- a/dev-packages/e2e-tests/verdaccio-config/config.yaml
+++ b/dev-packages/e2e-tests/verdaccio-config/config.yaml
@@ -80,6 +80,12 @@ packages:
unpublish: $all
# proxy: npmjs # Don't proxy for E2E tests!
+ '@sentry/nestjs':
+ access: $all
+ publish: $all
+ unpublish: $all
+ # proxy: npmjs # Don't proxy for E2E tests!
+
'@sentry/nextjs':
access: $all
publish: $all
diff --git a/dev-packages/test-utils/src/event-proxy-server.ts b/dev-packages/test-utils/src/event-proxy-server.ts
index 25ddbfe94966..82693bf4af89 100644
--- a/dev-packages/test-utils/src/event-proxy-server.ts
+++ b/dev-packages/test-utils/src/event-proxy-server.ts
@@ -115,14 +115,28 @@ export async function startEventProxyServer(options: EventProxyServerOptions): P
eventCallbackListeners.forEach(listener => {
const rawSentryResponseBody = Buffer.concat(sentryResponseChunks).toString();
- const data: SentryRequestCallbackData = {
- envelope: parseEnvelope(proxyRequestBody),
- rawProxyRequestBody: proxyRequestBody,
- rawSentryResponseBody,
- sentryResponseStatusCode: sentryResponse.statusCode,
- };
-
- listener(Buffer.from(JSON.stringify(data)).toString('base64'));
+ try {
+ const data: SentryRequestCallbackData = {
+ envelope: parseEnvelope(proxyRequestBody),
+ rawProxyRequestBody: proxyRequestBody,
+ rawSentryResponseBody,
+ sentryResponseStatusCode: sentryResponse.statusCode,
+ };
+
+ listener(Buffer.from(JSON.stringify(data)).toString('base64'));
+ } catch (error) {
+ if (`${error}`.includes('Unexpected token') && proxyRequestBody.includes('{"type":"replay_event"}')) {
+ // eslint-disable-next-line no-console
+ console.log('[event-proxy-server] Info: Received replay event, skipping...');
+ } else {
+ // eslint-disable-next-line no-console
+ console.error(
+ '[event-proxy-server] Error: Failed to parse Sentry request envelope',
+ error,
+ proxyRequestBody,
+ );
+ }
+ }
});
proxyResponse.end();
});
diff --git a/docs/creating-a-new-sdk.md b/docs/creating-a-new-sdk.md
new file mode 100644
index 000000000000..f33a33170dc4
--- /dev/null
+++ b/docs/creating-a-new-sdk.md
@@ -0,0 +1,146 @@
+# Creating a new SDK
+
+While each SDK (e.g. `@sentry/react` or `@sentry/nextjs`) is somewhat unique, we try to follow some general themes when
+creating a new SDK.
+
+## Types of SDKs
+
+Broadly speaking, there are three types of SDKs:
+
+1. Browser SDKs (e.g. `@sentry/react` or `@sentry/angular`)
+2. Server SDKs (e.g. `@sentry/bun` or `@sentry/node`)
+3. Meta SDKs (e.g. `@sentry/nextjs` or `@sentry/sveltekit`) - which cover both Browser & Server
+
+Depending on what type of SDK you are creating, you'll have to include different things.
+
+## General Guidelines
+
+As a rule of thumb, we should follow these two ideas:
+
+1. Whenever possible, instrumentation should work without (or with as little as possible) user configuration.
+2. Instrumentation should follow common patterns for a specific platform. No config is always preferred, but if config
+ is unavoidable, it should feel as native as possible to users of the given framework.
+
+## 1. Browser SDKs
+
+A purely browser SDK generally should cover the following things:
+
+### 1a. Error Monitoring
+
+We have global error handlers out of the box. However, in many frameworks there are ways for users to capture errors
+too, which may lead to them not bubble up to our global handlers. Generally, the goal is that all errors are captured by
+Sentry.
+
+Either we should use some hook (e.g. `app.on('error')`) to capture exceptions, or provide composables (e.g. an error
+boundary component in React) that users can use in their app to ensure all errors are captured by Sentry.
+
+### 1b. Performance Monitoring
+
+#### Routing Instrumentation
+
+At a minimum, each browser SDK should have **Routing Instrumentation**.
+
+While we have a default `browserTracingIntegration`, this has no access to a router, and is thus only based on URLs. We
+should strive to provide a custom `browserTracingIntegration` for SDKs that can leverage the router & routing
+information.
+
+Ideally, this means that we can emit pageload & navigation spans with parametrized route names instead of full URLs.
+
+Some of the following concepts may be relevant to your SDK:
+
+- **Redirects**: If possible, we want to skip redirects. This means that if a user navigates to `/`, and this redirects
+ the user internally to `/dashboard`, we only want to capture a single `/` navigation/pageload.
+- **Route Params**: Routes should be parametrized, which means that instead of `/users/123` we want to capture
+ `/users/:id` or simmilar.
+- **Query Params**: Query params should generally be removed from the route.
+
+#### Component Tracking
+
+Additionally, depending on the framework we may also have **Component Tracking**. We may track the duration of component
+renders and similar things. These are stretch goals, though, and do not need to be part of an MVP.
+
+## 2. Server SDKs
+
+A purely server SDK generally should cover the following things:
+
+### 2a. Error Monitoring
+
+We have global error handlers out of the box. However, in many frameworks there are ways for users to capture errors
+too, which may lead to them not bubbling up to our global handlers. Generally, the goal is that all errors are captured
+by Sentry.
+
+Either we should use some hook (e.g. `app.on('error')`) to capture exceptions, or provide composables (e.g.
+`setupFastifyErrorHandler(app)`) that user can call.
+
+### 2b. Performance Monitoring
+
+#### Routing Instrumentation
+
+At a minimum, each Node SDK should have **Routing Instrumentation**.
+
+Most SDKs that build on top of `@sentry/node` should automatically have basic `http.server` spans emitted for incoming
+requests by the `httpIntegration`. However, these spans do not contain any routing information (e.g. a `http.route`
+attribute). A server SDK should make sure to add route information to these spans.
+
+If there are things that should be captured in spans that are not covered by `httpIntegration`, we may need to write our
+own instrumentation to capture `http.server` spans.
+
+Some of the following concepts may be relevant to your SDK:
+
+- **Route Params**: Routes should be parametrized, which means that instead of `/users/123` we want to capture
+ `/users/:id` or simmilar.
+- **Query Params**: Query params should generally be removed from the route.
+
+#### Middleware Tracking
+
+Additionally, Node SDKs may also do **Middleware Tracking**. If possible, we may want to instrument middlewares, and
+create spans for them. These are stretch goals, though, and do not need to be part of an MVP.
+
+### 2c. OPTIONAL: Additional features
+
+We may also want to instrument additional features, if applicable, including:
+
+- Automatic cron instrumentation
+- [Cache module](https://docs.sentry.io/product/insights/caches/) - See
+ [Instrument Caches](https://docs.sentry.io/platforms/javascript/guides/connect/tracing/instrumentation/custom-instrumentation/caches-module/)
+- [Queue module](https://docs.sentry.io/product/insights/queue-monitoring/) - See
+ [Instrument Queues](https://docs.sentry.io/platforms/javascript/guides/connect/tracing/instrumentation/custom-instrumentation/queues-module/)
+
+## 3. Meta SDKs
+
+Meta SDKs should contain both the things pointed out in 1. and 2, _PLUS_:
+
+### 3a. Connected Traces
+
+Traces from SSR (server side) should be continued in the client side (browser). Usually this means that we have to
+inject the trace data as `` tags into the rendered HTML pages. If possible, we should do that automatically. If
+there is no way to do that automatically, we should provide a utility for users to do it themselves.
+
+### 3b. Instrumented Server Components / API Routes / etc.
+
+Depending on the framework, we should instrument all the pieces that exist in this framework. This includes capturing
+errors & spans for things like:
+
+- Server Components
+- API Routes
+- Layouts
+- etc.
+
+When possible, we should auto-capture this. If not possible, we should provide utilities for users to do this
+themselves.
+
+### 3c. Bundler Integration / Source Maps
+
+When possible, Meta SDKs should integrate with the used bundler. For example, SvelteKit uses Vite, so we should
+automatically set up `@sentry/vite-plugin` for the user. At a minimum, we want to enable source maps upload for the meta
+SDK, but this may also include automated release creation and other bundler features.
+
+We _should not_ expose the bundler plugin config directly, because this means that we cannot bump the underlying bundler
+plugin version in a major way (because the bundler plugin config becomes public API of the meta SDK). Instead, we should
+provide an abstraction layer of options that we expose on top of that.
+
+### 3d. Alternate JS Runtimes
+
+We generally want to support Node runtimes for the server. However, sometimes there may be alternate runtimes that may
+be supported, e.g. Cloudflare Workers or Vercel Edge Functions. We generally do not need to support these in an MVP, but
+may decide to support them later.
diff --git a/docs/new-sdk-release-checklist.md b/docs/new-sdk-release-checklist.md
index a6e0f60e8235..1292c5363fb0 100644
--- a/docs/new-sdk-release-checklist.md
+++ b/docs/new-sdk-release-checklist.md
@@ -29,22 +29,18 @@ differ slightly for other SDKs depending on how they are structured and how they
- [ ] Make sure that the tarball (`yarn build:tarball`) has all the necessary contents
- For basic SDKs, this means that the tarball has at least these files:
+ For basic SDKs, this means that the tarball has at least these files - you can configure what is included in the
+ tarball via the `files` field in `package.json`:
- - [ ] `cjs/.js`
- - [ ] `esm/.js`
- - [ ] `types/`
+ - [ ] `build/cjs/.js` (or `build/npm/cjs/.js`)
+ - [ ] `build/esm/.js` (or `build/npm/esm/.js`)
+ - [ ] `build/types/` (or `build/npm/types/.js`)
- [ ] `package.json`
- [ ] Entry points registered in this file match the file structure above
- [ ] `LICENSE`
- [ ] `README.md`
- - [ ] If your tarball should contain additional files outside `esm`, `cjs`, and `types` that are not listed above
- (e.g. like Gatsby or Remix), be sure to add a package-specific `prepack.ts` script. In this script, you can copy
- these additional files and make other adjustments.\
- Check out the
- [Gatsby script](https://github.com/getsentry/sentry-javascript/blob/acd7fbb56ed1859ce48f06a76143075108631c25/packages/gatsby/scripts/prepack.ts#L1)
- as an example.\
- It’s recommended to build and pack a tarball and then `yarn add path/to/tarball.tar.gz` it to your test app(s)
+ - [ ] Any additional files that should be part of the tarball
+ - [ ] It’s recommended to build and pack a tarball and then `yarn add path/to/tarball.tar.gz` it to your test app(s)
to ensure that it has all the correct files.
- [ ] Make sure `build.yml` CI script is correctly set up to cover tests for the new package
diff --git a/docs/triaging.md b/docs/triaging.md
index cd0b1ea1aa65..31a8f4fd1f35 100644
--- a/docs/triaging.md
+++ b/docs/triaging.md
@@ -43,6 +43,17 @@ categorize the issue as soon as possible. If an issue is hard to fix, an edge ca
reply and put the issue in backlog. You may also encourage the user to contribute a PR themselves if we are unlikely to
find time to resolve the issue ourselves anytime soon.
+Additionally, triaging does not have to happen in one sitting. If you've invested a reasonable amount of time into
+triaging an issue, but have not yet found the root cause/a solution, you can always post an update in the issue about
+what you've tried so far (and what worked/didn't work), and continue looking into the issue later/on another day. This
+depends on the severity of the issue, of course — if something appears to be a critical issue potentially affecting lots
+of users, we should prioritise fixing it even if it takes longer.
+
+If a ticket is in the Web SDK triaging queue, but should be handled by another team (e.g. Replay, Feedback, Profiling),
+feel free to ping members of that team in a respective Slack channel to please take a look at the issue. You should also
+make sure to apply the correct package labels (e.g. `Package: Replay`, `Package: User Feedback`,
+`Package: profiling-node`) to indicate what an issue is about.
+
### (Sentry Employees) How & when should I triage issues?
Ideally, you can take some time every day in the morning to look over the triage queue and identify issues that you can
diff --git a/package.json b/package.json
index 43891c4ef0cf..eab00cafbd18 100644
--- a/package.json
+++ b/package.json
@@ -60,6 +60,7 @@
"packages/gatsby",
"packages/google-cloud-serverless",
"packages/integration-shims",
+ "packages/nestjs",
"packages/nextjs",
"packages/node",
"packages/nuxt",
diff --git a/packages/angular/ng-package.json b/packages/angular/ng-package.json
index 64304f12de15..0bbbbdcdef14 100644
--- a/packages/angular/ng-package.json
+++ b/packages/angular/ng-package.json
@@ -5,5 +5,5 @@
"entryFile": "src/index.ts"
},
"allowedNonPeerDependencies": ["@sentry/browser", "@sentry/core", "@sentry/utils", "@sentry/types", "tslib"],
- "assets": ["README.md", "LICENSE"]
+ "assets": []
}
diff --git a/packages/angular/package.json b/packages/angular/package.json
index c1cd1d9e8a92..8a6453ca6cca 100644
--- a/packages/angular/package.json
+++ b/packages/angular/package.json
@@ -57,7 +57,7 @@
"test": "yarn test:unit",
"test:unit": "vitest run",
"test:unit:watch": "vitest --watch",
- "yalc:publish": "yalc publish build --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
@@ -73,8 +73,8 @@
"outputs": [
"{projectRoot}/build/esm2015",
"{projectRoot}/build/fesm2015",
- "{projectRoot}/build/*.{md,json}",
- "{projectRoot}/build/LICENCE"
+ "{projectRoot}/build/fesm2020",
+ "{projectRoot}/build/*.d.ts"
]
}
}
diff --git a/packages/astro/package.json b/packages/astro/package.json
index baec52659ca7..6c6edb7ea39f 100644
--- a/packages/astro/package.json
+++ b/packages/astro/package.json
@@ -18,12 +18,7 @@
},
"type": "module",
"files": [
- "cjs",
- "esm",
- "types",
- "types-ts3.8",
- "import-hook.mjs",
- "loader-hook.mjs"
+ "/build"
],
"main": "build/cjs/index.client.js",
"module": "build/esm/index.server.js",
@@ -66,7 +61,7 @@
"@sentry/node": "8.12.0",
"@sentry/types": "8.12.0",
"@sentry/utils": "8.12.0",
- "@sentry/vite-plugin": "^2.19.0"
+ "@sentry/vite-plugin": "^2.20.1"
},
"devDependencies": {
"astro": "^3.5.0",
@@ -81,7 +76,7 @@
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts",
"clean": "rimraf build coverage sentry-astro-*.tgz",
"fix": "eslint . --format stylish --fix",
@@ -89,7 +84,7 @@
"test": "yarn test:unit",
"test:unit": "vitest run",
"test:watch": "vitest --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/astro/src/integration/index.ts b/packages/astro/src/integration/index.ts
index 15e48cb49f12..9baee4d9dc39 100644
--- a/packages/astro/src/integration/index.ts
+++ b/packages/astro/src/integration/index.ts
@@ -48,6 +48,11 @@ export const sentryAstro = (options: SentryOptions = {}): AstroIntegration => {
sourcemaps: {
assets: uploadOptions.assets ?? [getSourcemapsAssetsGlob(config)],
},
+ _metaOptions: {
+ telemetry: {
+ metaFramework: 'astro',
+ },
+ },
debug: options.debug ?? false,
}),
],
diff --git a/packages/astro/test/integration/index.test.ts b/packages/astro/test/integration/index.test.ts
index cda2d3b1aa8c..886e77ada2dd 100644
--- a/packages/astro/test/integration/index.test.ts
+++ b/packages/astro/test/integration/index.test.ts
@@ -60,6 +60,11 @@ describe('sentryAstro integration', () => {
sourcemaps: {
assets: ['out/**/*'],
},
+ _metaOptions: {
+ telemetry: {
+ metaFramework: 'astro',
+ },
+ },
});
});
@@ -80,6 +85,11 @@ describe('sentryAstro integration', () => {
sourcemaps: {
assets: ['dist/**/*'],
},
+ _metaOptions: {
+ telemetry: {
+ metaFramework: 'astro',
+ },
+ },
});
});
@@ -107,6 +117,11 @@ describe('sentryAstro integration', () => {
sourcemaps: {
assets: ['{.vercel,dist}/**/*'],
},
+ _metaOptions: {
+ telemetry: {
+ metaFramework: 'astro',
+ },
+ },
});
});
@@ -139,6 +154,11 @@ describe('sentryAstro integration', () => {
sourcemaps: {
assets: ['dist/server/**/*, dist/client/**/*'],
},
+ _metaOptions: {
+ telemetry: {
+ metaFramework: 'astro',
+ },
+ },
});
});
diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json
index db5bf42fbd6b..4d864b0f6b54 100644
--- a/packages/aws-serverless/package.json
+++ b/packages/aws-serverless/package.json
@@ -10,12 +10,9 @@
"node": ">=14.18"
},
"files": [
- "cjs",
- "esm",
- "types",
- "types-ts3.8",
- "import-hook.mjs",
- "loader-hook.mjs"
+ "/build/npm",
+ "/build/import-hook.mjs",
+ "/build/loader-hook.mjs"
],
"main": "build/npm/cjs/index.js",
"types": "build/npm/types/index.d.ts",
@@ -88,14 +85,14 @@
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build dist-awslambda-layer coverage sentry-serverless-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "jest",
"test:watch": "jest --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/browser-utils/package.json b/packages/browser-utils/package.json
index a73e87b2477d..53a5a765874c 100644
--- a/packages/browser-utils/package.json
+++ b/packages/browser-utils/package.json
@@ -10,10 +10,7 @@
"node": ">=14.18"
},
"files": [
- "cjs",
- "esm",
- "types",
- "types-ts3.8"
+ "/build"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
@@ -57,14 +54,14 @@
"build:dev:watch": "run-p build:transpile:watch build:types:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
+ "build:tarball": "npm pack",
"clean": "rimraf build coverage sentry-internal-browser-utils-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test:unit": "jest",
"test": "jest",
"test:watch": "jest --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/browser/package.json b/packages/browser/package.json
index 55cc3144a723..0e5a21767baa 100644
--- a/packages/browser/package.json
+++ b/packages/browser/package.json
@@ -10,10 +10,7 @@
"node": ">=14.18"
},
"files": [
- "cjs",
- "esm",
- "types",
- "types-ts3.8"
+ "/build/npm"
],
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
@@ -68,7 +65,7 @@
"build:bundle:watch": "rollup -c rollup.bundle.config.mjs --watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build coverage .rpt2_cache sentry-browser-*.tgz",
"fix": "eslint . --format stylish --fix",
@@ -78,7 +75,7 @@
"test:unit": "jest",
"test:package": "node test/package/npm-build.js && rm test/package/tmp.js",
"test:unit:watch": "jest --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/bun/package.json b/packages/bun/package.json
index 295faadd6511..ba0e6205845c 100644
--- a/packages/bun/package.json
+++ b/packages/bun/package.json
@@ -10,10 +10,7 @@
"node": ">=14.18"
},
"files": [
- "cjs",
- "esm",
- "types",
- "types-ts3.8"
+ "/build"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
@@ -62,7 +59,7 @@
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build coverage sentry-bun-*.tgz",
"fix": "eslint . --format stylish --fix",
@@ -71,7 +68,7 @@
"test": "run-s install:bun test:bun",
"test:bun": "bun test",
"test:watch": "bun test --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/core/package.json b/packages/core/package.json
index 432aaeb7b62d..f549088161b8 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -10,10 +10,7 @@
"node": ">=14.18"
},
"files": [
- "cjs",
- "esm",
- "types",
- "types-ts3.8"
+ "/build"
],
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
@@ -56,14 +53,14 @@
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build coverage sentry-core-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "jest",
"test:watch": "jest --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/deno/package.json b/packages/deno/package.json
index 111682c9925d..eefb8ea4d340 100644
--- a/packages/deno/package.json
+++ b/packages/deno/package.json
@@ -21,9 +21,7 @@
"access": "public"
},
"files": [
- "index.mjs",
- "index.mjs.map",
- "index.d.ts"
+ "/build"
],
"dependencies": {
"@sentry/core": "8.12.0",
@@ -43,7 +41,7 @@
"build:types": "run-s deno-types build:types:tsc build:types:bundle",
"build:types:tsc": "tsc -p tsconfig.types.json",
"build:types:bundle": "rollup -c rollup.types.config.mjs",
- "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build build-types build-test coverage",
"prefix": "yarn deno-types",
@@ -57,7 +55,7 @@
"test:types": "deno check ./build/index.mjs",
"test:unit": "deno test --allow-read --allow-run",
"test:unit:update": "deno test --allow-read --allow-write --allow-run -- --update",
- "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/eslint-config-sdk/package.json b/packages/eslint-config-sdk/package.json
index 180827521667..de7380692e5b 100644
--- a/packages/eslint-config-sdk/package.json
+++ b/packages/eslint-config-sdk/package.json
@@ -15,7 +15,7 @@
"node": ">=14.18"
},
"files": [
- "src"
+ "/src"
],
"main": "src/index.js",
"publishConfig": {
diff --git a/packages/eslint-plugin-sdk/package.json b/packages/eslint-plugin-sdk/package.json
index a72a3c3a0d15..d96ece7a35b1 100644
--- a/packages/eslint-plugin-sdk/package.json
+++ b/packages/eslint-plugin-sdk/package.json
@@ -15,7 +15,7 @@
"node": ">=14.18"
},
"files": [
- "src"
+ "/src"
],
"main": "src/index.js",
"publishConfig": {
diff --git a/packages/feedback/package.json b/packages/feedback/package.json
index 7f3898f59f99..bcd5b2a69cd8 100644
--- a/packages/feedback/package.json
+++ b/packages/feedback/package.json
@@ -10,10 +10,7 @@
"node": ">=14.18"
},
"files": [
- "cjs",
- "esm",
- "types",
- "types-ts3.8"
+ "/build/npm"
],
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
@@ -62,14 +59,14 @@
"build:transpile:watch": "yarn build:transpile --watch",
"build:bundle:watch": "yarn build:bundle --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build sentry-internal-feedback-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "jest",
"test:watch": "jest --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/feedback/src/core/sendFeedback.test.ts b/packages/feedback/src/core/sendFeedback.test.ts
index 195c208b448a..96df79828ac8 100644
--- a/packages/feedback/src/core/sendFeedback.test.ts
+++ b/packages/feedback/src/core/sendFeedback.test.ts
@@ -275,7 +275,9 @@ describe('sendFeedback', () => {
email: 're@example.org',
message: 'mi',
}),
- ).rejects.toMatch('Unable to send Feedback. Invalid response from server.');
+ ).rejects.toMatch(
+ 'Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker',
+ );
});
it('handles 0 transport error', async () => {
diff --git a/packages/feedback/src/core/sendFeedback.ts b/packages/feedback/src/core/sendFeedback.ts
index a046111cc9ad..3f8c08a51ee3 100644
--- a/packages/feedback/src/core/sendFeedback.ts
+++ b/packages/feedback/src/core/sendFeedback.ts
@@ -63,7 +63,9 @@ export const sendFeedback: SendFeedback = (
);
}
- return reject('Unable to send Feedback. Invalid response from server.');
+ return reject(
+ 'Unable to send Feedback. This could be because of network issues, or because you are using an ad-blocker',
+ );
});
});
};
diff --git a/packages/feedback/src/modal/components/Dialog.css.ts b/packages/feedback/src/modal/components/Dialog.css.ts
index a9d1f4331606..48e2a05716c2 100644
--- a/packages/feedback/src/modal/components/Dialog.css.ts
+++ b/packages/feedback/src/modal/components/Dialog.css.ts
@@ -122,8 +122,8 @@ const FORM = `
}
.form__error-container {
- color: var(--error-foreground);
- fill: var(--error-foreground);
+ color: var(--error-color);
+ fill: var(--error-color);
}
.form__label {
diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json
index 446459d9a591..237397ed8eb6 100644
--- a/packages/gatsby/package.json
+++ b/packages/gatsby/package.json
@@ -14,10 +14,7 @@
"node": ">=14.18"
},
"files": [
- "cjs",
- "esm",
- "types",
- "types-ts3.8",
+ "/build",
"gatsby-node.js",
"gatsby-node.d.ts"
],
@@ -75,14 +72,14 @@
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build coverage *.d.ts sentry-gatsby-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "yarn ts-node scripts/pretest.ts && yarn jest",
"test:watch": "yarn ts-node scripts/pretest.ts && yarn jest --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/gatsby/scripts/prepack.ts b/packages/gatsby/scripts/prepack.ts
deleted file mode 100644
index f6bf056fcfa3..000000000000
--- a/packages/gatsby/scripts/prepack.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-/* eslint-disable no-console */
-
-// DO NOT RUN this script yourself!
-// This is invoked from the main `prepack.ts` script in `sentry-javascript/scripts/prepack.ts`.
-
-import * as fs from 'fs';
-import * as path from 'path';
-
-const PACKAGE_ASSETS = ['gatsby-node.js', 'gatsby-node.d.ts'];
-
-export function prepack(buildDir: string): boolean {
- // copy package-specific assets to build dir
- return PACKAGE_ASSETS.every(asset => {
- const assetPath = path.resolve(asset);
- const destinationPath = path.resolve(buildDir, asset);
- try {
- if (!fs.existsSync(assetPath)) {
- console.error(`\nERROR: Asset '${asset}' does not exist.`);
- return false;
- }
- console.log(`Copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}.`);
- fs.copyFileSync(assetPath, destinationPath);
- } catch (error) {
- console.error(
- `\nERROR: Error while copying ${path.basename(asset)} to ${path.relative('../..', destinationPath)}:\n`,
- error,
- );
- return false;
- }
- return true;
- });
-}
diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json
index b0c2fab0ce82..9bb4376fd11b 100644
--- a/packages/google-cloud-serverless/package.json
+++ b/packages/google-cloud-serverless/package.json
@@ -10,12 +10,7 @@
"node": ">=14.18"
},
"files": [
- "cjs",
- "esm",
- "types",
- "types-ts3.8",
- "import-hook.mjs",
- "loader-hook.mjs"
+ "/build"
],
"main": "build/cjs/index.js",
"types": "build/types/index.d.ts",
@@ -79,14 +74,14 @@
"build:dev:watch": "yarn build:watch",
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
- "build:tarball": "ts-node ../../scripts/prepack.ts && npm pack ./build",
+ "build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build coverage sentry-google-cloud-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"test": "jest",
"test:watch": "jest --watch",
- "yalc:publish": "ts-node ../../scripts/prepack.ts && yalc publish build --push --sig"
+ "yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
diff --git a/packages/integration-shims/package.json b/packages/integration-shims/package.json
index 00711c4a21bc..15024e78660e 100644
--- a/packages/integration-shims/package.json
+++ b/packages/integration-shims/package.json
@@ -5,6 +5,9 @@
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
+ "files": [
+ "/build"
+ ],
"exports": {
"./package.json": "./package.json",
".": {
diff --git a/packages/nestjs/.eslintrc.js b/packages/nestjs/.eslintrc.js
new file mode 100644
index 000000000000..fdb9952bae52
--- /dev/null
+++ b/packages/nestjs/.eslintrc.js
@@ -0,0 +1,6 @@
+module.exports = {
+ env: {
+ node: true,
+ },
+ extends: ['../../.eslintrc.js'],
+};
diff --git a/packages/nestjs/LICENSE b/packages/nestjs/LICENSE
new file mode 100644
index 000000000000..63e7eb28e19c
--- /dev/null
+++ b/packages/nestjs/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 Functional Software, Inc. dba Sentry
+
+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.
diff --git a/packages/nestjs/README.md b/packages/nestjs/README.md
new file mode 100644
index 000000000000..58ab6bc95372
--- /dev/null
+++ b/packages/nestjs/README.md
@@ -0,0 +1,43 @@
+