Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Normalise ANR debug image file paths if appRoot was supplied #14708

Closed
wants to merge 6 commits into from
Closed
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
44 changes: 14 additions & 30 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,37 +142,21 @@ targets:
id: '@sentry-internal/eslint-config-sdk'
includeNames: /^sentry-internal-eslint-config-sdk-\d.*\.tgz$/

# TODO(v9): Remove this target
# NOTE: We publish the v8 layer under its own name so people on v8 can still get patches
# whenever we release a new v8 version—otherwise we would overwrite the current major lambda layer.
- name: aws-lambda-layer
includeNames: /^sentry-node-serverless-\d+.\d+.\d+(-(beta|alpha|rc)\.\d+)?\.zip$/
layerName: SentryNodeServerlessSDKv8
compatibleRuntimes:
- name: node
versions:
- nodejs10.x
- nodejs12.x
- nodejs14.x
- nodejs16.x
- nodejs18.x
- nodejs20.x
license: MIT

# AWS Lambda Layer target
- name: aws-lambda-layer
includeNames: /^sentry-node-serverless-\d+.\d+.\d+(-(beta|alpha|rc)\.\d+)?\.zip$/
layerName: SentryNodeServerlessSDK
compatibleRuntimes:
- name: node
versions:
- nodejs10.x
- nodejs12.x
- nodejs14.x
- nodejs16.x
- nodejs18.x
- nodejs20.x
license: MIT
# TODO(v9): Once stable, re-add this target to publish the AWS Lambda layer
# - name: aws-lambda-layer
# includeNames: /^sentry-node-serverless-\d+.\d+.\d+(-(beta|alpha|rc)\.\d+)?\.zip$/
# layerName: SentryNodeServerlessSDK
# compatibleRuntimes:
# - name: node
# versions:
# - nodejs10.x
# - nodejs12.x
# - nodejs14.x
# - nodejs16.x
# - nodejs18.x
# - nodejs20.x
# license: MIT

# CDN Bundle Target
- name: gcs
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

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

Work in this release was contributed by @antonis. Thank you for your contribution!

## 8.45.0

- feat(core): Add `handled` option to `captureConsoleIntegration` ([#14664](https://github.com/getsentry/sentry-javascript/pull/14664))
Expand Down
13 changes: 6 additions & 7 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,16 @@
}
},
"ignore": [
".vscode/*",
".vscode",
"**/*.json",
".next/**/*",
".svelte-kit/**/*",
"**/fixtures/*/*.json",
"**/*.min.js",
".next/**",
".svelte-kit/**",
".angular/**",
".next",
".nuxt",
".svelte-kit",
".angular",
"angular.json",
"ember/instance-initializers/**",
"ember/instance-initializers",
"ember/types.d.ts",
"solidstart/*.d.ts",
"solidstart/client/",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"clean": "rimraf tmp node_modules && yarn clean:test-applications && yarn clean:pnpm",
"ci:build-matrix": "ts-node ./lib/getTestMatrix.ts",
"ci:build-matrix-optional": "ts-node ./lib/getTestMatrix.ts --optional=true",
"clean:test-applications": "rimraf --glob test-applications/**/{node_modules,dist,build,.next,.sveltekit,pnpm-lock.yaml,.last-run.json,test-results}",
"clean:test-applications": "rimraf --glob test-applications/**/{node_modules,dist,build,.next,.nuxt,.sveltekit,pnpm-lock.yaml,.last-run.json,test-results}",
"clean:pnpm": "pnpm store prune"
},
"devDependencies": {
Expand Down
8 changes: 5 additions & 3 deletions packages/node/src/integrations/anr/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,13 @@ function applyDebugMeta(event: Event): void {

if (filenameToDebugId.size > 0) {
const images: DebugImage[] = [];
for (const [filename, debugId] of filenameToDebugId.entries()) {
for (const [filename, debug_id] of filenameToDebugId.entries()) {
const code_file = options.appRootPath ? normalizeUrlToBase(filename, options.appRootPath) : filename;

images.push({
type: 'sourcemap',
code_file: filename,
debug_id: debugId,
code_file,
debug_id,
});
}
event.debug_meta = { images };
Expand Down
33 changes: 2 additions & 31 deletions packages/nuxt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,35 +130,6 @@ export default defineNuxtConfig({
});
```

## Troubleshooting
## Troubleshoot

When adding `sentry.server.config.ts`, you might get an error like this:
"`Failed to register ESM hook import-in-the-middle/hook.mjs`". You can add an override (npm/pnpm) or a resolution (yarn)
for `@vercel/nft` to fix this. This will add the `hook.mjs` file to your build output
([Nitro issue here](https://github.com/unjs/nitro/issues/2703)).

For `npm`:

```json
"overrides": {
"@vercel/nft": "^0.27.4"
}
```

for `yarn`:

```json
"resolutions": {
"@vercel/nft": "^0.27.4"
}
```

or for `pnpm`:

```json
"pnpm": {
"overrides": {
"@vercel/nft": "^0.27.4"
}
}
```
If you encounter any issues with error tracking or integrations, refer to the official [Sentry Nuxt SDK documentation](https://docs.sentry.io/platforms/javascript/guides/nuxt/). If the documentation does not provide the necessary information, consider opening an issue on GitHub.
Loading