Skip to content

Commit

Permalink
Merge branch 'develop' into chdsbd/mark-error-handler-errors-unhandled
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiPrasad authored Jun 8, 2023
2 parents 0ad66b7 + b877c10 commit 6f7e66c
Show file tree
Hide file tree
Showing 213 changed files with 6,286 additions and 1,316 deletions.
41 changes: 3 additions & 38 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,43 +253,6 @@ jobs:
# `job_build` can't see `job_install_deps` and what it returned)
dependency_cache_key: ${{ needs.job_install_deps.outputs.dependency_cache_key }}

job_pack_aws_lambda_layer:
name: Pack and Upload AWS Lambda Layer
needs: [job_get_metadata, job_build]
# only upload the zipped layer file if we're about to release
if: startsWith(github.ref, 'refs/heads/release/')
runs-on: ubuntu-20.04
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
- name: Restore caches
uses: ./.github/actions/restore-cache
env:
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}

- name: Get SDK version
# `jq` reads JSON files, and `tee` pipes its input to the given location and to stdout. (Adding `-a` is the
# equivalent of using >> rather than >.)
run: |
export SDK_VERSION=$(cat packages/core/package.json | jq --raw-output '.version')
echo "SDK_VERSION=$SDK_VERSION" | tee -a $GITHUB_ENV
- name: Move dist-serverless to root directory (requirement for zipping action)
run: |
mv ./packages/serverless/build/aws/dist-serverless .
- name: Create and upload final zip file
uses: getsentry/action-build-aws-lambda-extension@v1
with:
artifact_name: ${{ env.HEAD_COMMIT }}
zip_file_name: sentry-node-serverless-${{ env.SDK_VERSION }}.zip
build_cache_paths: ${{ env.CACHED_BUILD_PATHS }}
build_cache_key: ${{ env.BUILD_CACHE_KEY }}

job_size_check:
name: Size Check
needs: [job_get_metadata, job_build]
Expand Down Expand Up @@ -399,6 +362,7 @@ jobs:
${{ github.workspace }}/packages/integrations/build/bundles/**
${{ github.workspace }}/packages/replay/build/bundles/**
${{ github.workspace }}/packages/**/*.tgz
${{ github.workspace }}/packages/serverless/build/aws/dist-serverless/*.zip
job_browser_unit_tests:
name: Browser Unit Tests
Expand Down Expand Up @@ -511,7 +475,7 @@ jobs:
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_browser_integration == 'true' || github.event_name != 'pull_request'
runs-on: ubuntu-20.04
timeout-minutes: 18
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -808,6 +772,7 @@ jobs:
job_node_integration_tests,
job_browser_playwright_tests,
job_browser_integration_tests,
job_browser_loader_tests,
job_remix_integration_tests,
job_e2e_tests,
]
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ jobs:
cd packages/e2e-tests
yarn test:e2e
- name: Create Issue
if: failure()
if: failure() && github.event_name == 'schedule'
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: .github/CANARY_FAILURE_TEMPLATE.md
update_existing: true

job_ember_canary_test:
name: Ember Canary Tests
Expand Down Expand Up @@ -92,10 +93,12 @@ jobs:
yarn ember try:one ${{ matrix.scenario }} --skip-cleanup=true
- name: Create Issue
if: failure()
if: failure() && github.event_name == 'schedule'
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: .github/CANARY_FAILURE_TEMPLATE.md
update_existing: true
title: 'Ember Canary tests failed'
186 changes: 174 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,158 @@

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

## 7.54.0

### Important Changes

- **feat(core): Add default entries to `ignoreTransactions` for Healthchecks #8191**

All SDKs now filter out health check transactions by default.
These are transactions where the transaction name matches typical API health check calls, such as `/^.*healthy.*$/` or `/^. *heartbeat.*$/`. Take a look at [this list](https://github.com/getsentry/sentry-javascript/blob/8c6ad156829f7c4eec34e4a67e6dd866ba482d5d/packages/core/src/integrations/inboundfilters.ts#L8C2-L16) to learn which regexes we currently use to match transaction names.
We believe that these transactions do not provide value in most cases and we want to save you some of your quota by filtering them out by default.
These filters are implemented as default values for the top level `ignoreTransactions` option.

You can disable this filtering by manually specifiying the `InboundFilters` integration and setting the `disableTransactionDefaults` option:
```js
Sentry.init({
//...
integrations: [new InboundFilters({ disableTransactionDefaults: true })],
})
```

- **feat(replay): Add `mutationBreadcrumbLimit` and `mutationLimit` to Replay Options (#8228)**

The previously experimental options `mutationBreadcumbLimit` and `mutationLimit` have been promoted to regular Replay integration options.

A high number of DOM mutations (in a single event loop) can cause performance regressions in end-users' browsers.
Use `mutationBreadcrumbLimit` to send a breadcrumb along with your recording if the mutation limit was reached.
Use `mutationLimit` to stop recording if the mutation limit was reached.
- **feat(sveltekit): Add source maps support for Vercel (lambda) (#8256)**
- feat(sveltekit): Auto-detect SvelteKit adapters (#8193)
The SvelteKit SDK can now be used if you deploy your SvelteKit app to Vercel.
By default, the SDK's Vite plugin will detect the used adapter and adjust the source map uploading config as necessary.
If you want to override the default adapter detection, you can specify the `adapter` option in the `sentrySvelteKit` options:

```js
// vite.config.js
export default defineConfig({
plugins: [
sentrySvelteKit({
adapter: 'vercel',
}),
sveltekit(),
],
});
```

Currently, the Vite plugin will configure itself correctly for `@sveltejs/adapter-auto`, `@sveltejs/adapter-vercel` and `@sveltejs/adapter-node`.

**Important:** The SvelteKit SDK is not yet compatible with Vercel's edge runtime.
It will only work for lambda functions.
### Other Changes
- feat(replay): Throttle breadcrumbs to max 300/5s (#8086)
- feat(sveltekit): Add option to control handling of unknown server routes (#8201)
- fix(node): Strip query and fragment from request URLs without route parameters (#8213)
- fix(remix): Don't log missing parameters warning on server-side. (#8269)
- fix(remix): Pass `loadContext` through wrapped document request function (#8268)
- fix(replay): Guard against missing key (#8246)
- fix(sveltekit): Avoid capturing redirects and 4xx Http errors in request Handlers (#8215)
- fix(sveltekit): Bump `magicast` to support `satisfied` keyword (#8254)
- fix(wasm): Avoid throwing an error when WASM modules are loaded from blobs (#8263)

## 7.53.1

- chore(deps): bump socket.io-parser from 4.2.1 to 4.2.3 (#8196)
- chore(svelte): Bump magic-string to 0.30.0 (#8197)
- fix(core): Fix racecondition that modifies in-flight sessions (#8203)
- fix(node): Catch `os.uptime()` throwing because of EPERM (#8206)
- fix(replay): Fix buffered replays creating replay w/o error occuring (#8168)

## 7.53.0

- feat(replay): Add `beforeAddRecordingEvent` Replay option (#8124)
- feat(replay): Do not capture replays < 5 seconds (#7949)
- fix(nextjs): Guard for non-absolute paths when injecting sentry config (#8151)
- fix(nextjs): Import path issue on Windows (#8142)
- fix(nextjs): Make `withSentryConfig` isomorphic (#8166)
- fix(node): Add debug logging for node checkin (#8131)
- fix(node): Add LRU map for tracePropagationTargets calculation (#8130)
- fix(node): Remove new URL usage in Undici integration (#8147)
- fix(replay): Show the correct Replay config option name `maskFn`
- fix(sveltekit): Avoid double-wrapping load functions (#8094)
- fix(tracing): Change where content-length gets added (#8139)
- fix(tracing): Use integer for content length (#8152)
- fix(utils): Fail silently if the provided Dsn is invalid (#8121)
- ref(node): Cache undici trace propagation decisions (#8136)
- ref(serverless): Remove relay extension from AWS Layer (#8080)

## 7.52.1

- feat(replay): Capture slow clicks (experimental) (#8052)


## 7.52.0

### Important Next.js SDK changes:

This release adds support Vercel Cron Jobs in the Next.js SDK.
The SDK will automatically create [Sentry Cron Monitors](https://docs.sentry.io/product/crons/) for your [Vercel Cron Jobs](https://vercel.com/docs/cron-jobs) configured via `vercel.json` when deployed on Vercel.

You can opt out of this functionality by setting the `automaticVercelMonitors` option to `false`:

```js
// next.config.js
const nextConfig = {
sentry: {
automaticVercelMonitors: false,
},
};
```

(Note: Sentry Cron Monitoring is currently in beta and subject to change. Help us make it better by letting us know what you think. Respond on [GitHub](https://github.com/getsentry/sentry/discussions/42283) or write to us at [email protected])

- feat(nextjs): Add API method to wrap API routes with crons instrumentation (#8084)
- feat(nextjs): Add automatic monitors for Vercel Cron Jobs (#8088)

### Other changes

- feat(replay): Capture keyboard presses for special characters (#8051)
- fix(build): Don't mangle away global debug ID map (#8096)
- fix(core): Return checkin id from client (#8116)
- fix(core): Use last error for `ignoreErrors` check (#8089)
- fix(docs): Change to `addTracingExtensions` was not documented in MIGRATION.md (#8101)
- fix(replay): Check relative URLs correctly (#8024)
- fix(tracing-internal): Avoid classifying protocol-relative URLs as same-origin urls (#8114)
- ref: Hoist `createCheckinEnvelope` to core package (#8082)

## 7.51.2

- fix(nextjs): Continue traces in data fetchers when there is an already active transaction on the hub (#8073)
- fix(sveltekit): Avoid creating the Sentry Vite plugin in dev mode (#8065)

## 7.51.1

- feat(replay): Add event to capture options on checkouts (#8011)
- feat(replay): Improve click target detection (#8026)
- fix(node): Make sure we use same ID for checkIns (#8050)
- fix(replay: Keep session active on key press (#8037)
- fix(replay): Move error sampling to before send (#8057)
- fix(sveltekit): Wrap `load` when typed explicitly (#8049)

**Replay `rrweb` changes:**

`@sentry-internal/rrweb` was updated from 1.106.0 to 1.108.0:

- fix: Fix some input masking (esp for radio buttons) ([#85](https://github.com/getsentry/rrweb/pull/85))
- fix: Unescaped `:` in CSS rule from Safari ([#86](https://github.com/getsentry/rrweb/pull/86))
- feat: Define custom elements (web components) ([#87](https://github.com/getsentry/rrweb/pull/87))

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

## 7.51.0

### Important Changes
Expand All @@ -26,30 +178,40 @@ Note that `@sentry/angular` _does not_ support Angular 16.

- **feat(node): Add ability to send cron monitor check ins (#8039)**

**Note: This release contains a bug with generating cron monitors. We recommend you upgrade the JS SDK to 7.51.1 or above to use cron monitoring functionality**

This release adds [Sentry cron monitoring](https://docs.sentry.io/product/crons/) support to the Node SDK.

To monitor your cron jobs, send check-ins everytime you execute your cron jobs to Sentry. You can do this with the `captureCheckIn` method exported from the SDK. First you must send an `in_progress`, checkin, then you can send one with status `ok` or `error` based on what happened with your cron job.
Check-in monitoring allows you to track a job's progress by completing two check-ins: one at the start of your job and another at the end of your job. This two-step process allows Sentry to notify you if your job didn't start when expected (missed) or if it exceeded its maximum runtime (failed).

```ts
const Sentry = require('@sentry/node');

// ...

Sentry.captureCheckIn({
// make sure this is the same slug as what you set up your
// Sentry cron monitor with.
monitorSlug: 'dailyEmail',
// 🟡 Notify Sentry your job is running:
const checkInId = Sentry.captureCheckIn({
monitorSlug: '<monitor-slug>',
status: 'in_progress',
});

const startTime = timeInSeconds();

runTask();
// Execute your scheduled task here...

// 🟢 Notify Sentry your job has completed successfully:
Sentry.captureCheckIn({
monitorSlug: 'dailyEmail',
// make sure you pass in the checkInId generated by the first call to captureCheckIn
checkInId,
monitorSlug: '<monitor-slug>',
status: 'ok',
duration: timeInSeconds() - startTime,
});
```

If your job execution fails, you can notify Sentry about the failure:

```javascript
// 🔴 Notify Sentry your job has failed:
Sentry.captureCheckIn({
checkInId,
monitorSlug: '<monitor-slug>',
status: 'error',
});
```

Expand Down
28 changes: 28 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@

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

## `addTracingExtensions` replaces `addExtensionMethods` (since 7.46.0)

Since the deprecation of `@sentry/tracing`, tracing extensions are now added by calling `addTracingExtensions` which is
exported from all framework SDKs.

```js
// Before
import * as Sentry from "@sentry/browser";
import { addExtensionMethods } from "@sentry/tracing";

Sentry.init({
dsn: '__DSN__',
tracesSampleRate: 1.0,
});

addExtensionMethods()

// After
import * as Sentry from "@sentry/browser";

Sentry.init({
dsn: '__DSN__',
tracesSampleRate: 1.0,
});

Sentry.addTracingExtensions();
```

## Remove requirement for `@sentry/tracing` package (since 7.46.0)

With `7.46.0` you no longer require the `@sentry/tracing` package to use tracing and performance monitoring with the Sentry JavaScript SDKs. The `@sentry/tracing` package will be removed in a future major release, but can still be used in the meantime.
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "7.51.0",
"version": "7.54.0",
"npmClient": "yarn",
"useWorkspaces": true
}
8 changes: 4 additions & 4 deletions packages/angular-ivy/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/angular-ivy",
"version": "7.51.0",
"version": "7.54.0",
"description": "Official Sentry SDK for Angular with full Ivy Support",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular-ivy",
Expand All @@ -21,9 +21,9 @@
"rxjs": "^6.5.5 || ^7.x"
},
"dependencies": {
"@sentry/browser": "7.51.0",
"@sentry/types": "7.51.0",
"@sentry/utils": "7.51.0",
"@sentry/browser": "7.54.0",
"@sentry/types": "7.54.0",
"@sentry/utils": "7.54.0",
"tslib": "^2.3.0"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/angular",
"version": "7.51.0",
"version": "7.54.0",
"description": "Official Sentry SDK for Angular",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
Expand All @@ -21,9 +21,9 @@
"rxjs": "^6.5.5 || ^7.x"
},
"dependencies": {
"@sentry/browser": "7.51.0",
"@sentry/types": "7.51.0",
"@sentry/utils": "7.51.0",
"@sentry/browser": "7.54.0",
"@sentry/types": "7.54.0",
"@sentry/utils": "7.54.0",
"tslib": "^2.0.0"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 6f7e66c

Please sign in to comment.