Skip to content

Commit

Permalink
Merge branch 'develop' into ci-yarn-deduplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
nwalters512 authored Feb 3, 2025
2 parents c8a3415 + e8c0260 commit 887c855
Show file tree
Hide file tree
Showing 55 changed files with 204 additions and 144 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/flaky-test-detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:

- name: Install Playwright
uses: ./.github/actions/install-playwright
with:
browsers: 'chromium'

- name: Determine changed tests
uses: dorny/[email protected]
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@

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

Work in this release was contributed by @tjhiggins, @chris-basebone, @GrizliK1988, @davidturissini, @nwalters512, @aloisklink, @arturovt, @benjick, @maximepvrt, @mstrokin, @kunal-511, @jahands, @jrandolf, @tannerlinsley, @Zen-cronic and @nathankleyn. Thank you for your contributions!
Work in this release was contributed by @tjhiggins, @chris-basebone, @GrizliK1988, @davidturissini, @nwalters512, @aloisklink, @arturovt, @benjick, @maximepvrt, @mstrokin, @kunal-511, @jahands, @jrandolf, @tannerlinsley, @Zen-cronic, @maxmaxme and @nathankleyn. Thank you for your contributions!

## 9.0.0-alpha.1

This is an alpha release of the upcoming major release of version 9.
This release does not yet entail a comprehensive changelog as version 9 is not yet stable.

For this release's iteration of the migration guide, see the [Migration Guide as per `9.0.0-alpha.1`](https://github.com/getsentry/sentry-javascript/blob/e4333e5ce2d65be319ee6a5a5976f7c93983a417/docs/migration/v8-to-v9.md).
Please note that the migration guide is work in progress and subject to change.

## 9.0.0-alpha.0

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": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"main": "index.js",
"license": "MIT",
"engines": {
Expand Down Expand Up @@ -42,7 +42,7 @@
"@babel/preset-typescript": "^7.16.7",
"@playwright/test": "~1.50.0",
"@sentry-internal/rrweb": "2.31.0",
"@sentry/browser": "9.0.0-alpha.0",
"@sentry/browser": "9.0.0-alpha.1",
"axios": "1.7.7",
"babel-loader": "^8.2.2",
"fflate": "0.8.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ ${changedPaths.join('\n')}
try {
await new Promise<void>((resolve, reject) => {
const cp = childProcess.spawn(
`npx playwright test ${testPaths.length ? testPaths.join(' ') : './suites'} --repeat-each ${repeatEachCount}`,
`npx playwright test ${
testPaths.length ? testPaths.join(' ') : './suites'
} --repeat-each ${repeatEachCount} --project=chromium`,
{ shell: true, cwd, stdio: 'inherit' },
);

Expand Down
2 changes: 1 addition & 1 deletion dev-packages/bundle-analyzer-scenarios/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/bundle-analyzer-scenarios",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Scenarios to test bundle analysis with",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/dev-packages/bundle-analyzer-scenarios",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/clear-cache-gh-action/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentry-internal/clear-cache-gh-action",
"description": "An internal Github Action to clear GitHub caches.",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"license": "MIT",
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/e2e-tests",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"license": "MIT",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/external-contributor-gh-action/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentry-internal/external-contributor-gh-action",
"description": "An internal Github Action to add external contributors to the CHANGELOG.md file.",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"license": "MIT",
"engines": {
"node": ">=18"
Expand Down
8 changes: 4 additions & 4 deletions dev-packages/node-integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/node-integration-tests",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"license": "MIT",
"engines": {
"node": ">=18"
Expand Down Expand Up @@ -31,9 +31,9 @@
"@nestjs/common": "10.4.6",
"@nestjs/core": "10.4.6",
"@nestjs/platform-express": "10.4.6",
"@sentry/aws-serverless": "9.0.0-alpha.0",
"@sentry/core": "9.0.0-alpha.0",
"@sentry/node": "9.0.0-alpha.0",
"@sentry/aws-serverless": "9.0.0-alpha.1",
"@sentry/core": "9.0.0-alpha.1",
"@sentry/node": "9.0.0-alpha.1",
"@types/mongodb": "^3.6.20",
"@types/mysql": "^2.15.21",
"@types/pg": "^8.6.5",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/rollup-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/rollup-utils",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Rollup utilities used at Sentry for the Sentry JavaScript SDK",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/rollup-utils",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/size-limit-gh-action/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sentry-internal/size-limit-gh-action",
"description": "An internal Github Action to compare the current size of a PR against the one on develop.",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"license": "MIT",
"engines": {
"node": ">=18"
Expand Down
4 changes: 2 additions & 2 deletions dev-packages/test-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"name": "@sentry-internal/test-utils",
"author": "Sentry",
"license": "MIT",
Expand Down Expand Up @@ -45,7 +45,7 @@
},
"devDependencies": {
"@playwright/test": "~1.50.0",
"@sentry/core": "9.0.0-alpha.0"
"@sentry/core": "9.0.0-alpha.1"
},
"volta": {
"extends": "../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion docs/migration/v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ This should not affect most users unless you relied on passing things with a sim
- The `Request` type has been removed. Use `RequestEventData` type instead.
- The `IntegrationClass` type is no longer exported - it was not used anymore. Instead, use `Integration` or `IntegrationFn`.
- The `samplingContext.request` attribute in the `tracesSampler` has been removed. Use `samplingContext.normalizedRequest` instead. Note that the type of `normalizedRequest` differs from `request`.
- The `samplingContext.transactionContext` object in the `tracesSampler` has been removed. All object attributes are available in the top-level of `samplingContext`.
- The `samplingContext.transactionContext` object in the `tracesSampler` and `profilesSampler` has been removed. All object attributes are available in the top-level of `samplingContext`.
- `Client` now always expects the `BaseClient` class - there is no more abstract `Client` that can be implemented! Any `Client` class has to extend from `BaseClient`.
- `ReportDialogOptions` now extends `Record<string, unknown>` instead of `Record<string, any>` - this should not affect most users.
- The `RequestDataIntegrationOptions` type has been removed. There is no replacement.
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"npmClient": "yarn"
}
6 changes: 3 additions & 3 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/angular",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"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,8 +21,8 @@
"rxjs": "^6.5.5 || ^7.x"
},
"dependencies": {
"@sentry/browser": "9.0.0-alpha.0",
"@sentry/core": "9.0.0-alpha.0",
"@sentry/browser": "9.0.0-alpha.1",
"@sentry/core": "9.0.0-alpha.1",
"tslib": "^2.4.1"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/astro",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Official Sentry SDK for Astro",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/astro",
Expand Down Expand Up @@ -56,9 +56,9 @@
"astro": ">=3.x || >=4.0.0-beta || >=5.x"
},
"dependencies": {
"@sentry/browser": "9.0.0-alpha.0",
"@sentry/core": "9.0.0-alpha.0",
"@sentry/node": "9.0.0-alpha.0",
"@sentry/browser": "9.0.0-alpha.1",
"@sentry/core": "9.0.0-alpha.1",
"@sentry/node": "9.0.0-alpha.1",
"@sentry/vite-plugin": "^2.22.6"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/aws-serverless/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/aws-serverless",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Official Sentry SDK for AWS Lambda and AWS Serverless Environments",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/serverless",
Expand Down Expand Up @@ -68,8 +68,8 @@
"@opentelemetry/instrumentation": "^0.57.1",
"@opentelemetry/instrumentation-aws-lambda": "0.50.2",
"@opentelemetry/instrumentation-aws-sdk": "0.49.0",
"@sentry/core": "9.0.0-alpha.0",
"@sentry/node": "9.0.0-alpha.0",
"@sentry/core": "9.0.0-alpha.1",
"@sentry/node": "9.0.0-alpha.1",
"@types/aws-lambda": "^8.10.62"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/browser-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry-internal/browser-utils",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Browser Utilities for all Sentry JavaScript SDKs",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser-utils",
Expand Down Expand Up @@ -39,7 +39,7 @@
"access": "public"
},
"dependencies": {
"@sentry/core": "9.0.0-alpha.0"
"@sentry/core": "9.0.0-alpha.1"
},
"scripts": {
"build": "run-p build:transpile build:types",
Expand Down
14 changes: 7 additions & 7 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/browser",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Official Sentry SDK for browsers",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
Expand Down Expand Up @@ -39,14 +39,14 @@
"access": "public"
},
"dependencies": {
"@sentry-internal/browser-utils": "9.0.0-alpha.0",
"@sentry-internal/feedback": "9.0.0-alpha.0",
"@sentry-internal/replay": "9.0.0-alpha.0",
"@sentry-internal/replay-canvas": "9.0.0-alpha.0",
"@sentry/core": "9.0.0-alpha.0"
"@sentry-internal/browser-utils": "9.0.0-alpha.1",
"@sentry-internal/feedback": "9.0.0-alpha.1",
"@sentry-internal/replay": "9.0.0-alpha.1",
"@sentry-internal/replay-canvas": "9.0.0-alpha.1",
"@sentry/core": "9.0.0-alpha.1"
},
"devDependencies": {
"@sentry-internal/integration-shims": "9.0.0-alpha.0",
"@sentry-internal/integration-shims": "9.0.0-alpha.1",
"fake-indexeddb": "^4.0.1"
},
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions packages/bun/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/bun",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Official Sentry SDK for bun",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/bun",
Expand Down Expand Up @@ -39,9 +39,9 @@
"access": "public"
},
"dependencies": {
"@sentry/core": "9.0.0-alpha.0",
"@sentry/node": "9.0.0-alpha.0",
"@sentry/opentelemetry": "9.0.0-alpha.0"
"@sentry/core": "9.0.0-alpha.1",
"@sentry/node": "9.0.0-alpha.1",
"@sentry/opentelemetry": "9.0.0-alpha.1"
},
"devDependencies": {
"bun-types": "latest"
Expand Down
4 changes: 2 additions & 2 deletions packages/cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/cloudflare",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Official Sentry SDK for Cloudflare Workers and Pages",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/cloudflare",
Expand Down Expand Up @@ -39,7 +39,7 @@
"access": "public"
},
"dependencies": {
"@sentry/core": "9.0.0-alpha.0"
"@sentry/core": "9.0.0-alpha.1"
},
"optionalDependencies": {
"@cloudflare/workers-types": "^4.x"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/core",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Base implementation for all Sentry JavaScript SDKs",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
Expand Down
7 changes: 6 additions & 1 deletion packages/core/src/tracing/sampling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ export function sampleSpan(
const parsedSampleRate = parseSampleRate(sampleRate);

if (parsedSampleRate === undefined) {
DEBUG_BUILD && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');
DEBUG_BUILD &&
logger.warn(
`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(
sampleRate,
)} of type ${JSON.stringify(typeof sampleRate)}.`,
);
return [false];
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/hasTracingEnabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function hasTracingEnabled(
const options = maybeOptions || client?.getOptions();
return (
!!options &&
// Note: This check is `!= null`, meaning "nullish"
// Note: This check is `!= null`, meaning "nullish". `0` is not "nullish", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life)
(options.tracesSampleRate != null || !!options.tracesSampler)
);
}
9 changes: 0 additions & 9 deletions packages/core/src/utils/parseSampleRate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import { DEBUG_BUILD } from '../debug-build';
import { logger } from '../utils-hoist/logger';

/**
* Parse a sample rate from a given value.
* This will either return a boolean or number sample rate, if the sample rate is valid (between 0 and 1).
Expand All @@ -15,12 +12,6 @@ export function parseSampleRate(sampleRate: unknown): number | undefined {

const rate = typeof sampleRate === 'string' ? parseFloat(sampleRate) : sampleRate;
if (typeof rate !== 'number' || isNaN(rate) || rate < 0 || rate > 1) {
DEBUG_BUILD &&
logger.warn(
`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(
sampleRate,
)} of type ${JSON.stringify(typeof sampleRate)}.`,
);
return undefined;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/deno/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/deno",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Official Sentry SDK for Deno",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/deno",
Expand All @@ -24,7 +24,7 @@
"/build"
],
"dependencies": {
"@sentry/core": "9.0.0-alpha.0"
"@sentry/core": "9.0.0-alpha.1"
},
"scripts": {
"deno-types": "node ./scripts/download-deno-types.mjs",
Expand Down
6 changes: 3 additions & 3 deletions packages/ember/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sentry/ember",
"version": "9.0.0-alpha.0",
"version": "9.0.0-alpha.1",
"description": "Official Sentry SDK for Ember.js",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/ember",
Expand Down Expand Up @@ -32,8 +32,8 @@
"dependencies": {
"@babel/core": "^7.24.4",
"@embroider/macros": "^1.16.0",
"@sentry/browser": "9.0.0-alpha.0",
"@sentry/core": "9.0.0-alpha.0",
"@sentry/browser": "9.0.0-alpha.1",
"@sentry/core": "9.0.0-alpha.1",
"ember-auto-import": "^2.7.2",
"ember-cli-babel": "^8.2.0",
"ember-cli-htmlbars": "^6.1.1",
Expand Down
Loading

0 comments on commit 887c855

Please sign in to comment.