Skip to content

Commit

Permalink
Merge branch 'develop' into cg/fetch-spans
Browse files Browse the repository at this point in the history
  • Loading branch information
chargome authored Jul 22, 2024
2 parents 43f9648 + eb23dc4 commit c191907
Show file tree
Hide file tree
Showing 244 changed files with 3,438 additions and 2,528 deletions.
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/internal.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 💡 [Internal] Blank Issue
description: Only for Sentry Employees! Create an issue without a template.
body:
- type: textarea
id: description
attributes:
label: Description
validations:
required: true
66 changes: 23 additions & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ jobs:
- *shared
- 'packages/browser/**'
- 'packages/browser-utils/**'
- 'packages/replay/**'
- 'packages/replay-internal/**'
- 'packages/replay-worker/**'
- 'packages/replay-canvas/**'
- 'packages/feedback/**'
- 'packages/wasm/**'
Expand All @@ -131,6 +132,7 @@ jobs:
- *node
- 'packages/nextjs/**'
- 'packages/react/**'
- 'packages/vercel-edge/**'
remix:
- *shared
- *browser
Expand All @@ -147,8 +149,10 @@ jobs:
- 'dev-packages/e2e-tests/test-applications/node-profiling/**'
deno:
- *shared
- *browser
- 'packages/deno/**'
bun:
- *shared
- 'packages/bun/**'
any_code:
- '!**/*.md'
Expand All @@ -166,6 +170,7 @@ jobs:
changed_profiling_node: ${{ steps.changed.outputs.profiling_node }}
changed_profiling_node_bindings: ${{ steps.changed.outputs.profiling_node_bindings }}
changed_deno: ${{ steps.changed.outputs.deno }}
changed_bun: ${{ steps.changed.outputs.bun }}
changed_browser: ${{ steps.changed.outputs.browser }}
changed_browser_integration: ${{ steps.changed.outputs.browser_integration }}
changed_any_code: ${{ steps.changed.outputs.any_code }}
Expand Down Expand Up @@ -451,6 +456,7 @@ jobs:
job_bun_unit_tests:
name: Bun Unit Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_bun == 'true' || github.event_name != 'pull_request'
timeout-minutes: 10
runs-on: ubuntu-20.04
strategy:
Expand Down Expand Up @@ -513,7 +519,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [14, 16, 18, 20, 22]
node: [14, 16, 18, 20, 22.4]
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v4
Expand Down Expand Up @@ -573,7 +579,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [14, 16, 18, 20, 22]
node: [14, 16, 18, 20, 22.4]
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v4
Expand Down Expand Up @@ -773,33 +779,6 @@ jobs:
name: playwright-traces
path: dev-packages/browser-integration-tests/test-results

job_browser_build_tests:
name: Browser Build Tests
needs: [job_get_metadata, job_build]
runs-on: ubuntu-20.04
timeout-minutes: 5
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v4
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: actions/setup-node@v4
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: Run browser build tests
run: |
cd packages/browser
yarn test:package
- name: Run utils build tests
run: |
cd packages/utils
yarn test:package
job_check_for_faulty_dts:
name: Check for faulty .d.ts files
needs: [job_get_metadata, job_build]
Expand Down Expand Up @@ -837,12 +816,12 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [14, 16, 18, 20, 22]
node: [14, 16, 18, 20, 22.4]
typescript:
- false
include:
# Only check typescript for latest version (to streamline CI)
- node: 22
- node: 22.4
typescript: '3.8'
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
Expand Down Expand Up @@ -879,7 +858,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [18, 20, 22]
node: [18, 20, 22.4]
remix: [1, 2]
# Remix v2 only supports Node 18+, so run 16 tests separately
include:
Expand Down Expand Up @@ -1031,7 +1010,9 @@ jobs:
'generic-ts3.8',
'node-fastify',
'node-hapi',
'nestjs',
'nestjs-basic',
'nestjs-distributed-tracing',
'nestjs-with-submodules',
'node-exports-test-app',
'node-koa',
'node-connect',
Expand Down Expand Up @@ -1309,7 +1290,6 @@ jobs:
[
job_build,
job_compile_bindings_profiling_node,
job_browser_build_tests,
job_browser_unit_tests,
job_bun_unit_tests,
job_deno_unit_tests,
Expand Down Expand Up @@ -1401,7 +1381,7 @@ jobs:
- os: ubuntu-20.04
node: 20
- os: ubuntu-20.04
node: 22
node: 22.4

# x64 musl
- os: ubuntu-20.04
Expand All @@ -1415,7 +1395,7 @@ jobs:
node: 20
- os: ubuntu-20.04
container: node:22-alpine3.18
node: 22
node: 22.4

# arm64 glibc
- os: ubuntu-20.04
Expand All @@ -1429,7 +1409,7 @@ jobs:
node: 20
- os: ubuntu-20.04
arch: arm64
node: 22
node: 22.4

# arm64 musl
- os: ubuntu-20.04
Expand All @@ -1447,7 +1427,7 @@ jobs:
- os: ubuntu-20.04
arch: arm64
container: node:22-alpine3.18
node: 22
node: 22.4

# macos x64
- os: macos-13
Expand All @@ -1460,7 +1440,7 @@ jobs:
node: 20
arch: x64
- os: macos-13
node: 22
node: 22.4
arch: x64

# macos arm64
Expand All @@ -1478,7 +1458,7 @@ jobs:
target_platform: darwin
- os: macos-13
arch: arm64
node: 22
node: 22.4
target_platform: darwin

# windows x64
Expand All @@ -1492,7 +1472,7 @@ jobs:
node: 20
arch: x64
- os: windows-2022
node: 22
node: 22.4
arch: x64

steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
${{ github.workspace }}/node_modules
${{ github.workspace }}/packages/*/node_modules
${{ github.workspace }}/dev-packages/*/node_modules
${{ github.workspace }}/packages/utils/build
permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/external-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
&& github.event.pull_request.author_association != 'COLLABORATOR'
&& github.event.pull_request.author_association != 'MEMBER'
&& github.event.pull_request.author_association != 'OWNER'
&& github.actor != 'dependabot[bot]'
&& endsWith(github.actor, '[bot]') == false
steps:
- uses: actions/checkout@v4
- name: Set up Node
Expand Down
2 changes: 1 addition & 1 deletion .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ module.exports = [
path: createCDNPath('bundle.tracing.replay.min.js'),
gzip: false,
brotli: false,
limit: '221 KB',
limit: '230 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',
Expand Down
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,49 @@

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

Work in this release was contributed by @GitSquared. Thank you for your contribution!
## 8.19.0

- feat(core): Align Span interface with OTEL (#12898)
- fix(angular): Remove `afterSendEvent` listener once root injector is destroyed (#12786)
- fix(browser): Fix bug causing unintentional dropping of transactions (#12933)
- fix(feedback): Add a missing call of Actor.appendToDom method when DOMContentLoaded event is triggered (#12973)
- feat(vercel-edge): Add dedupe as default integration (#12957)
- fix(node): Pass inferred name & attributes to `tracesSampler` (#12945)
- feat(express): Allow to pass options to `setupExpressErrorHandler` (#12952)

Work in this release was contributed by @jaspreet57 and @arturovt. Thank you for your contribution!

## 8.18.0

### Important Changes

- **ref: Deprecate `enableTracing` (12897)**

The `enableTracing` option has been deprecated and will be removed in the next major version. We recommend removing it
in favor of the `tracesSampleRate` and `tracesSampler` options. If you want to enable performance monitoring, please set
the `tracesSampleRate` to a sample rate of your choice, or provide a sampling function as `tracesSampler` option
instead. If you want to disable performance monitoring, remove the `tracesSampler` and `tracesSampleRate` options.

### Other Changes

- feat(node): Expose `exclude` and `include` options for ESM loader (#12910)
- feat(browser): Add user agent to INP standalone span attributes (#12896)
- feat(nextjs): Add `experimental_captureRequestError` for `onRequestError` hook (#12885)
- feat(replay): Bump `rrweb` to 2.25.0 (#12478)
- feat(tracing): Add long animation frame tracing (#12646)
- fix: Cleanup hooks when they are not used anymore (#12852)
- fix(angular): Guard `ErrorEvent` check in ErrorHandler to avoid throwing in Node environments (#12892)
- fix(inp): Ensure INP spans have correct transaction (#12871)
- fix(nestjs): Do not make SentryTraced() decorated functions async (#12879)
- fix(nextjs): Support automatic instrumentation for app directory with custom page extensions (#12858)
- fix(node): Ensure correct URL is passed to `ignoreIncomingRequests` callback (#12929)
- fix(otel): Do not add `otel.kind: INTERNAL` attribute (#12841)
- fix(solidstart): Set proper sentry origin for solid router integration when used in solidstart sdk (#12919)
- fix(sveltekit): Add Vite peer dep for proper type resolution (#12926)
- fix(tracing): Ensure you can pass `null` as `parentSpan` in `startSpan*` (#12928)
- ref(core): Small bundle size improvement (#12830)

Work in this release was contributed by @GitSquared, @ziyadkhalil and @mcous. Thank you for your contributions!

## 8.17.0

Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ able to use it. From the top level of the repo, there are three commands availab
dependencies (`utils`, `core`, `browser`, etc), and all packages which depend on it (currently `gatsby` and `nextjs`))
- `yarn build:dev:watch`, which runs `yarn build:dev` in watch mode (recommended)

Note: Due to package incompatibilities between Python versions, building native binaries currently requires a Python
version <3.12.

You can also run a production build via `yarn build`, which will build everything except for the tarballs for publishing
to NPM. You can use this if you want to bundle Sentry yourself. The build output can be found in the packages `build/`
folder, e.g. `packages/browser/build`. Bundled files can be found in `packages/browser/build/bundles`. Note that there
Expand Down
16 changes: 16 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ Removed top-level exports: `enableAnrDetection`, `Anr`, `deepReadDirSync`, `runW
- [Removal of `enableAnrDetection` and `Anr` class](./MIGRATION.md#removal-of-enableanrdetection-and-anr-class)
- [Removal of `deepReadDirSync` method](./MIGRATION.md#removal-of-deepreaddirsync-method)
- [Removal of `runWithAsyncContext` method](./MIGRATION.md#removal-of-runwithasynccontext-method)
- [Removal of `Apollo` integration](./MIGRATION.md#removal-of-apollo-integration)
#### Removal of `enableAnrDetection` and `Anr` class
Expand All @@ -737,6 +738,21 @@ Sentry.withIsolationScope(() => {
});
```
#### Removal of Apollo integration
The Apollo integration has been removed in `8.x` as `8.x` automatically adds GraphQL support via `graphqlIntegration`
which is automatically enabled.
```js
// before (v7)
Sentry.init({
integrations: [Sentry.integrations.Apollo()],
});

// after (v8)
Sentry.init({});
```
### Next.js SDK
Removed top-level exports: `withSentryApi`, `withSentryAPI`, `withSentryGetServerSideProps`, `withSentryGetStaticProps`,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ package. Please refer to the README and instructions of those SDKs for more deta
- [`@sentry/vue`](https://github.com/getsentry/sentry-javascript/tree/master/packages/vue): Browser SDK for Vue
- [`@sentry/solid`](https://github.com/getsentry/sentry-javascript/tree/master/packages/solid): Browser SDK for Solid
- [`@sentry/gatsby`](https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby): SDK for Gatsby
- [`@sentry/nestjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nestjs): SDK for NestJS
- [`@sentry/nextjs`](https://github.com/getsentry/sentry-javascript/tree/master/packages/nextjs): SDK for Next.js
- [`@sentry/remix`](https://github.com/getsentry/sentry-javascript/tree/master/packages/remix): SDK for Remix
- [`@sentry/aws-serverless`](https://github.com/getsentry/sentry-javascript/tree/master/packages/aws-serverless): SDK
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/browser-integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/browser-integration-tests",
"version": "8.17.0",
"version": "8.19.0",
"main": "index.js",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "^1.44.1",
"@sentry-internal/rrweb": "2.11.0",
"@sentry/browser": "8.17.0",
"@sentry/browser": "8.19.0",
"axios": "1.6.7",
"babel-loader": "^8.2.2",
"html-webpack-plugin": "^5.5.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
/* eslint-disable no-console */
const Sentry = require('../../build/npm/cjs/index.js');

// Init
Sentry.init({
dsn: 'https://completelyrandom@dsn.asdf/42',
beforeSend(_event) {
console.log('Got an event');
return null;
},
beforeBreadcrumb(crumb) {
console.log(`Got a breadcrumb: ${crumb.category}`);
return crumb;
},
});

// Configure
const scope = Sentry.getCurrentScope();
scope.setExtra('foo', 'bar');
scope.setFingerprint('foo');
Expand Down Expand Up @@ -75,6 +58,5 @@ Sentry.withScope(scope => {

var xhr = new XMLHttpRequest();
xhr.onload = () => console.log('loaded'); // This throws error
// xhr.addEventListener("load", () => console.log('loaded')); This does not throw error
xhr.open('GET', 'https://httpbin.org/get');
xhr.send();
Loading

0 comments on commit c191907

Please sign in to comment.