Skip to content

Commit

Permalink
Merge pull request #9272 from getsentry/prepare-release/7.74.1
Browse files Browse the repository at this point in the history
meta: Update CHANGELOG for 7.74.1
  • Loading branch information
Lms24 authored Oct 17, 2023
2 parents 05cba8f + 16e1af1 commit 5fa1515
Show file tree
Hide file tree
Showing 64 changed files with 1,386 additions and 313 deletions.
2 changes: 2 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ targets:
onlyIfPresent: /^sentry-angular-ivy-\d.*\.tgz$/
'npm:@sentry/angular':
onlyIfPresent: /^sentry-angular-\d.*\.tgz$/
'npm:@sentry/astro':
onlyIfPresent: /^sentry-astro-\d.*\.tgz$/
'npm:@sentry/wasm':
onlyIfPresent: /^sentry-wasm-\d.*\.tgz$/
'npm:@sentry/nextjs':
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ body:
If you're using the CDN bundles, please specify the exact bundle (e.g. `bundle.tracing.min.js`) in your SDK
setup.
options:
- '@sentry/astro'
- '@sentry/browser'
- '@sentry/angular'
- '@sentry/angular-ivy'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,7 @@ jobs:
'create-next-app',
'create-remix-app',
'create-remix-app-v2',
'debug-id-sourcemaps',
'nextjs-app-dir',
'react-create-hash-router',
'react-router-6-use-routes',
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/issue-package-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
# Note: Since this is handled as a regex, and JSON parse wrangles slashes /, we just use `.` instead
map: |
{
"@sentry.astro": {
"label": "Package: Astro"
},
"@sentry.browser": {
"label": "Package: Browser"
},
Expand Down
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = [
name: '@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped)',
path: 'packages/browser/build/bundles/bundle.tracing.replay.min.js',
gzip: true,
limit: '80 KB',
limit: '90 KB',
},
{
name: '@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped)',
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@

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

## 7.74.1

- chore(astro): Add `astro-integration` keyword (#9265)
- fix(core): Narrow filters for health check transactions (#9257)
- fix(nextjs): Fix HMR by inserting new entrypoints at the end (#9267)
- fix(nextjs): Fix resolution of request async storage module (#9259)
- fix(node-experimental): Guard against missing `fetch` (#9275)
- fix(remix): Update `defer` injection logic. (#9242)
- fix(tracing-internal): Parameterize express middleware parameters (#8668)
- fix(utils): Move Node specific ANR impl. out of utils (#9258)

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

## 7.74.0

### Important Changes
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ For each major JavaScript platform, there is a specific high-level SDK that prov
package. Please refer to the README and instructions of those SDKs for more detailed information:

- [`@sentry/browser`](https://github.com/getsentry/sentry-javascript/tree/master/packages/browser): SDK for Browsers
- [`@sentry/bun`](https://github.com/getsentry/sentry-javascript/tree/master/packages/bun): SDK for Bun
- [`@sentry/node`](https://github.com/getsentry/sentry-javascript/tree/master/packages/node): SDK for Node including
integrations for Express
- [`@sentry/angular`](https://github.com/getsentry/sentry-javascript/tree/master/packages/angular): Browser SDK for Angular
- [`@sentry/angular-ivy`](https://github.com/getsentry/sentry-javascript/tree/master/packages/angular-ivy): Browser SDK for
Angular with native support for Angular's Ivy rendering engine.
- [`@sentry/astro`](https://github.com/getsentry/sentry-javascript/tree/master/packages/astro): SDK for Astro
- [`@sentry/ember`](https://github.com/getsentry/sentry-javascript/tree/master/packages/ember): Browser SDK for Ember
- [`@sentry/react`](https://github.com/getsentry/sentry-javascript/tree/master/packages/react): Browser SDK for React
- [`@sentry/svelte`](https://github.com/getsentry/sentry-javascript/tree/master/packages/svelte): Browser SDK for Svelte
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"packages/ember",
"packages/eslint-config-sdk",
"packages/eslint-plugin-sdk",
"packages/feedback",
"packages/gatsby",
"packages/hub",
"packages/integrations",
Expand Down Expand Up @@ -82,7 +83,7 @@
"@rollup/plugin-replace": "^3.0.1",
"@rollup/plugin-sucrase": "^4.0.3",
"@rollup/plugin-typescript": "^8.3.1",
"@size-limit/preset-small-lib": "^4.5.5",
"@size-limit/preset-small-lib": "~9.0.0",
"@strictsoftware/typedoc-plugin-monorepo": "^0.3.1",
"@types/chai": "^4.1.3",
"@types/jest": "^27.4.1",
Expand Down Expand Up @@ -118,7 +119,7 @@
"rollup-plugin-license": "^2.6.1",
"rollup-plugin-terser": "^7.0.2",
"sinon": "^7.3.2",
"size-limit": "^4.5.5",
"size-limit": "~9.0.0",
"ts-jest": "^27.1.4",
"ts-node": "10.9.1",
"tslib": "2.4.1",
Expand Down
1 change: 1 addition & 0 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"keywords": [
"withastro",
"astro-component",
"astro-integration",
"sentry",
"apm"
],
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/integrations/inboundfilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { getEventDescription, logger, stringMatchesSomePattern } from '@sentry/u
const DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/];

const DEFAULT_IGNORE_TRANSACTIONS = [
/^.*healthcheck.*$/,
/^.*healthy.*$/,
/^.*live.*$/,
/^.*ready.*$/,
/^.*heartbeat.*$/,
/^.*\/healthcheck$/,
/^.*\/healthy$/,
/^.*\/live$/,
/^.*\/ready$/,
/^.*\/heartbeat$/,
/^.*\/health$/,
/^.*\/healthz$/,
];
Expand Down
12 changes: 12 additions & 0 deletions packages/core/test/lib/integrations/inboundfilters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,18 @@ describe('InboundFilters', () => {
expect(eventProcessor(TRANSACTION_EVENT_HEALTH_2, {})).toBe(TRANSACTION_EVENT_HEALTH_2);
expect(eventProcessor(TRANSACTION_EVENT_HEALTH_3, {})).toBe(TRANSACTION_EVENT_HEALTH_3);
});

it.each(['/delivery', '/already', '/healthysnacks'])(
"doesn't filter out transactions that have similar names to health check ones (%s)",
transaction => {
const eventProcessor = createInboundFiltersEventProcessor();
const evt: Event = {
transaction,
type: 'transaction',
};
expect(eventProcessor(evt, {})).toBe(evt);
},
);
});

describe('denyUrls/allowUrls', () => {
Expand Down
7 changes: 5 additions & 2 deletions packages/deno/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// @ts-check
import nodeResolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import sucrase from '@rollup/plugin-sucrase';
import { defineConfig } from 'rollup';

export default {
export default defineConfig({
input: ['src/index.ts'],
treeshake: 'smallest',
output: {
dir: 'build',
sourcemap: true,
Expand All @@ -21,4 +24,4 @@ export default {
commonjs(),
sucrase({ transforms: ['typescript'] }),
],
};
});
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@sentry:registry=http://localhost:4873
@sentry-internal:registry=http://localhost:4873
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "debug-id-sourcemaps",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "rollup --config rollup.config.mjs",
"test": "vitest run",
"clean": "npx rimraf node_modules,pnpm-lock.yaml",
"test:build": "pnpm install && pnpm build",
"test:assert": "pnpm test"
},
"dependencies": {
"@sentry/node": "latest || *"
},
"devDependencies": {
"rollup": "^4.0.2",
"vitest": "^0.34.6",
"@sentry/rollup-plugin": "2.8.0"
},
"volta": {
"extends": "../../package.json"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from 'rollup';
import { sentryRollupPlugin } from '@sentry/rollup-plugin';

export default defineConfig({
input: './src/app.js',
external: ['@sentry/node'],
plugins: [
sentryRollupPlugin({
org: process.env.E2E_TEST_SENTRY_ORG_SLUG,
project: process.env.E2E_TEST_SENTRY_TEST_PROJECT,
authToken: process.env.E2E_TEST_AUTH_TOKEN,
}),
],
output: {
file: './dist/app.js',
compact: true,
format: 'cjs',
sourcemap: 'hidden',
},
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as Sentry from '@sentry/node';

Sentry.init({
environment: 'qa', // dynamic sampling bias to keep transactions
dsn: process.env.E2E_TEST_DSN,
});

const eventId = Sentry.captureException(new Error('Sentry Debug ID E2E Test Error'));

process.stdout.write(eventId);
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Find symbolicated event on sentry 1`] = `
{
"colno": 41,
"contextLine": "const eventId = Sentry.captureException(new Error('Sentry Debug ID E2E Test Error'));",
"lineno": 8,
"postContext": [
"",
"process.stdout.write(eventId);",
],
"preContext": [
"Sentry.init({",
" environment: 'qa', // dynamic sampling bias to keep transactions",
" dsn: process.env.E2E_TEST_DSN,",
"});",
"",
],
}
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { test } from 'vitest';
import childProcess from 'child_process';
import path from 'path';

const authToken = process.env.E2E_TEST_AUTH_TOKEN;
const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG;
const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT;
const EVENT_POLLING_TIMEOUT = 30_000;

test(
'Find symbolicated event on sentry',
async ({ expect }) => {
const eventId = childProcess.execSync(`node ${path.join(__dirname, '..', 'dist', 'app.js')}`, {
encoding: 'utf-8',
});

console.log(`Polling for error eventId: ${eventId}`);

let timedOut = false;
setTimeout(() => {
timedOut = true;
}, EVENT_POLLING_TIMEOUT);

while (!timedOut) {
await new Promise(resolve => setTimeout(resolve, 2000)); // poll every two seconds
const response = await fetch(
`https://sentry.io/api/0/projects/${sentryTestOrgSlug}/${sentryTestProject}/events/${eventId}/json/`,
{ headers: { Authorization: `Bearer ${authToken}` } },
);

// Only allow ok responses or 404
if (!response.ok) {
expect(response.status).toBe(404);
continue;
}

const eventPayload = await response.json();
const frames = eventPayload.exception?.values?.[0]?.stacktrace?.frames;
const topFrame = frames[frames.length - 1];
expect({
preContext: topFrame?.pre_context,
contextLine: topFrame?.context_line,
postContext: topFrame?.post_context,
lineno: topFrame?.lineno,
colno: topFrame?.colno,
}).toMatchSnapshot();
return;
}

throw new Error('Test timed out');
},
{ timeout: EVENT_POLLING_TIMEOUT },
);
2 changes: 2 additions & 0 deletions packages/feedback/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
build/
36 changes: 36 additions & 0 deletions packages/feedback/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Note: All paths are relative to the directory in which eslint is being run, rather than the directory where this file
// lives

// ESLint config docs: https://eslint.org/docs/user-guide/configuring/

module.exports = {
extends: ['../../.eslintrc.js'],
overrides: [
{
files: ['jest.setup.ts', 'jest.config.ts'],
parserOptions: {
project: ['tsconfig.test.json'],
},
rules: {
'no-console': 'off',
},
},
{
files: ['test/**/*.ts'],

rules: {
// most of these errors come from `new Promise(process.nextTick)`
'@typescript-eslint/unbound-method': 'off',
// TODO: decide if we want to enable this again after the migration
// We can take the freedom to be a bit more lenient with tests
'@typescript-eslint/no-floating-promises': 'off',
},
},
{
files: ['src/types/deprecated.ts'],
rules: {
'@typescript-eslint/naming-convention': 'off',
},
},
],
};
4 changes: 4 additions & 0 deletions packages/feedback/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
/*.tgz
.eslintcache
build
14 changes: 14 additions & 0 deletions packages/feedback/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright (c) 2023 Sentry (https://sentry.io) and individual contributors. All rights reserved.

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.
Loading

0 comments on commit 5fa1515

Please sign in to comment.