Skip to content

Commit

Permalink
Merge pull request #8682 from getsentry/prepare-release/7.61.0
Browse files Browse the repository at this point in the history
meta(changelog): Update changelog for 7.61.0
  • Loading branch information
mydea authored Jul 31, 2023
2 parents 4269df8 + 1ccb8d2 commit 6f082a1
Show file tree
Hide file tree
Showing 70 changed files with 1,896 additions and 203 deletions.
59 changes: 32 additions & 27 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,102 +6,107 @@ targets:
## 1. Base Packages, node or browser SDKs depend on
## 1.1 Types
- name: npm
id: "@sentry/types"
id: '@sentry/types'
includeNames: /^sentry-types-\d.*\.tgz$/
## 1.2 Utils
- name: npm
id: "@sentry/utils"
id: '@sentry/utils'
includeNames: /^sentry-utils-\d.*\.tgz$/
## 1.3 Core SDK
- name: npm
id: "@sentry/core"
id: '@sentry/core'
includeNames: /^sentry-core-\d.*\.tgz$/
## 1.4 Tracing package
- name: npm
id: "@sentry-internal/tracing"
id: '@sentry-internal/tracing'
includeNames: /^sentry-internal-tracing-\d.*\.tgz$/
## 1.5 Replay package (browser only)
- name: npm
id: "@sentry/replay"
id: '@sentry/replay'
includeNames: /^sentry-replay-\d.*\.tgz$/

## 2. Browser & Node SDKs
- name: npm
id: "@sentry/browser"
id: '@sentry/browser'
includeNames: /^sentry-browser-\d.*\.tgz$/
- name: npm
id: "@sentry/node"
id: '@sentry/node'
includeNames: /^sentry-node-\d.*\.tgz$/

## 3 Browser-based Packages
- name: npm
id: "@sentry/angular-ivy"
id: '@sentry/angular-ivy'
includeNames: /^sentry-angular-ivy-\d.*\.tgz$/
- name: npm
id: "@sentry/angular"
id: '@sentry/angular'
includeNames: /^sentry-angular-\d.*\.tgz$/
- name: npm
id: "@sentry/ember"
id: '@sentry/ember'
includeNames: /^sentry-ember-\d.*\.tgz$/
- name: npm
id: "@sentry/react"
id: '@sentry/react'
includeNames: /^sentry-react-\d.*\.tgz$/
- name: npm
id: "@sentry/svelte"
id: '@sentry/svelte'
includeNames: /^sentry-svelte-\d.*\.tgz$/
- name: npm
id: "@sentry/vue"
id: '@sentry/vue'
includeNames: /^sentry-vue-\d.*\.tgz$/
- name: npm
id: "@sentry/wasm"
id: '@sentry/wasm'
includeNames: /^sentry-wasm-\d.*\.tgz$/
- name: npm
id: "@sentry/integrations"
id: '@sentry/integrations'
includeNames: /^sentry-integrations-\d.*\.tgz$/

## 4. Node-based Packages
- name: npm
id: "@sentry/serverless"
id: '@sentry/serverless'
includeNames: /^sentry-serverless-\d.*\.tgz$/
- name: npm
id: "@sentry/opentelemetry-node"
id: '@sentry/opentelemetry-node'
includeNames: /^sentry-opentelemetry-node-\d.*\.tgz$/

## 5. Fullstack/Meta Frameworks (depending on Node and Browser or Framework SDKs)
- name: npm
id: "@sentry/nextjs"
id: '@sentry/nextjs'
includeNames: /^sentry-nextjs-\d.*\.tgz$/
- name: npm
id: "@sentry/remix"
id: '@sentry/remix'
includeNames: /^sentry-remix-\d.*\.tgz$/
- name: npm
id: "@sentry/sveltekit"
id: '@sentry/sveltekit'
includeNames: /^sentry-sveltekit-\d.*\.tgz$/
- name: npm
id: "@sentry/gatsby"
id: '@sentry/gatsby'
includeNames: /^sentry-gatsby-\d.*\.tgz$/

## 6. Other Packages
## 6.1
- name: npm
id: "@sentry-internal/typescript"
id: '@sentry-internal/typescript'
includeNames: /^sentry-internal-typescript-\d.*\.tgz$/
- name: npm
id: "@sentry-internal/eslint-plugin-sdk"
id: '@sentry-internal/eslint-plugin-sdk'
includeNames: /^sentry-internal-eslint-plugin-sdk-\d.*\.tgz$/
## 6.2
- name: npm
id: "@sentry-internal/eslint-config-sdk"
id: '@sentry-internal/eslint-config-sdk'
includeNames: /^sentry-internal-eslint-config-sdk-\d.*\.tgz$/

## 7. Deprecated packages we still release (but no packages depend on them anymore)
- name: npm
id: "@sentry/hub"
id: '@sentry/hub'
includeNames: /^sentry-hub-\d.*\.tgz$/
- name: npm
id: "@sentry/tracing"
id: '@sentry/tracing'
includeNames: /^sentry-tracing-\d.*\.tgz$/

## 8. Experimental packages
- name: npm
id: '@sentry/node-experimental'
includeNames: /^sentry-node-experimental-\d.*\.tgz$/

# AWS Lambda Layer target
- name: aws-lambda-layer
includeNames: /^sentry-node-serverless-\d+.\d+.\d+(-(beta|alpha)\.\d+)?\.zip$/
Expand All @@ -118,7 +123,7 @@ targets:

# CDN Bundle Target
- name: gcs
id: "browser-cdn-bundles"
id: 'browser-cdn-bundles'
includeNames: /.*\.js.*$/
bucket: sentry-js-sdk
paths:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/label-last-commenter.yml

This file was deleted.

18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@

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

## 7.61.0

### Important Changes

- **feat(node-experimental): Add `@sentry/node-experimental` package as MVP for POTEL (#8609)**

This introduces a new, *experimental* package, `@sentry/node-experimental`.
This is a variant of the Node SDK which uses OpenTelemetry under the hood for performance instrumentation.

Note that this package is very much WIP, considered unstable and may change at any time.
**No SemVer guarantees apply whatsoever.** Still, if you're brave enough you can give it a try.
[Read more about @sentry/node-experimental](./packages/node-experimental/README.md)

### Other Changes

- fix(node): Don't set extra baggage headers (#8657)
- fix(tracing): Trim idle transaction spans if they exceed final timeout (#8653)

## 7.60.1

- fix(nextjs): Match folder paths with trailing separator (#8615)
Expand Down
2 changes: 1 addition & 1 deletion docs/new-sdk-release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ When you’re ready to make the first release, there are a couple of steps that
- [ ] 3) Add an `npm` target in `craft.yml` for the new package. Make sure to insert it in the right place, after all the Sentry dependencies of your package but before packages that depend on your new package (if applicable).
```yml
- name: npm
id: npm:@sentry/[yourPackage]
id: '@sentry/[yourPackage]'
includeNames: /^sentry-[yourPackage]-\d.*\.tgz$/
```
- [ ] 4) Cut a new release (as usual, see [Publishing Release](https://github.com/getsentry/sentry-javascript/blob/develop/docs/publishing-a-release.md))
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"postpublish": "lerna run --stream --concurrency 1 postpublish",
"test": "lerna run --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\" test",
"test:unit": "lerna run --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\" test:unit",
"test-ci-browser": "lerna run test --ignore \"@sentry/{node,opentelemetry-node,serverless,nextjs,remix,gatsby,sveltekit}\" --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\"",
"test-ci-browser": "lerna run test --ignore \"@sentry/{node,node-experimental,opentelemetry-node,serverless,nextjs,remix,gatsby,sveltekit}\" --ignore \"@sentry-internal/{browser-integration-tests,e2e-tests,integration-shims,node-integration-tests,overhead-metrics}\"",
"test-ci-node": "ts-node ./scripts/node-unit-tests.ts",
"test:update-snapshots": "lerna run test:update-snapshots",
"yalc:publish": "lerna run yalc:publish"
Expand All @@ -54,6 +54,7 @@
"packages/nextjs",
"packages/node",
"packages/node-integration-tests",
"packages/node-experimental",
"packages/opentelemetry-node",
"packages/react",
"packages/remix",
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/baseclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
/** @inheritdoc */
public on(hook: 'createDsc', callback: (dsc: DynamicSamplingContext) => void): void;

/** @inheritdoc */
public on(hook: 'otelSpanEnd', callback: (otelSpan: unknown, mutableOptions: { drop: boolean }) => void): void;

/** @inheritdoc */
public on(hook: string, callback: unknown): void {
if (!this._hooks[hook]) {
Expand All @@ -413,6 +416,9 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
/** @inheritdoc */
public emit(hook: 'createDsc', dsc: DynamicSamplingContext): void;

/** @inheritdoc */
public emit(hook: 'otelSpanEnd', otelSpan: unknown, mutableOptions: { drop: boolean }): void;

/** @inheritdoc */
public emit(hook: string, ...rest: unknown[]): void {
if (this._hooks[hook]) {
Expand Down
23 changes: 15 additions & 8 deletions packages/core/src/tracing/idletransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,22 @@ export class IdleTransaction extends Transaction {
logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));
}

const keepSpan = span.startTimestamp < endTimestamp;
if (!keepSpan) {
__DEBUG_BUILD__ &&
logger.log(
'[Tracing] discarding Span since it happened after Transaction was finished',
JSON.stringify(span, undefined, 2),
);
const spanStartedBeforeTransactionFinish = span.startTimestamp < endTimestamp;

// Add a delta with idle timeout so that we prevent false positives
const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000;
const spanEndedBeforeFinalTimeout = span.endTimestamp - this.startTimestamp < timeoutWithMarginOfError;

if (__DEBUG_BUILD__) {
const stringifiedSpan = JSON.stringify(span, undefined, 2);
if (!spanStartedBeforeTransactionFinish) {
logger.log('[Tracing] discarding Span since it happened after Transaction was finished', stringifiedSpan);
} else if (!spanEndedBeforeFinalTimeout) {
logger.log('[Tracing] discarding Span since it finished after Transaction final timeout', stringifiedSpan);
}
}
return keepSpan;

return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout;
});

__DEBUG_BUILD__ && logger.log('[Tracing] flushing IdleTransaction');
Expand Down
3 changes: 2 additions & 1 deletion packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"test:validate-test-app-setups": "ts-node validate-test-app-setups.ts",
"test:prepare": "ts-node prepare.ts",
"test:validate": "run-s test:validate-configuration test:validate-test-app-setups",
"clean": "rimraf tmp test-applications/**/{node_modules,dist,build,.next,.sveltekit,pnpm-lock.yaml}"
"clean": "rimraf tmp node_modules && yarn clean:test-applications",
"clean:test-applications": "rimraf test-applications/**/{node_modules,dist,build,.next,.sveltekit,pnpm-lock.yaml}"
},
"devDependencies": {
"@types/glob": "8.0.0",
Expand Down
33 changes: 30 additions & 3 deletions packages/e2e-tests/run.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
/* eslint-disable max-lines */
/* eslint-disable no-console */
import { exec } from 'child_process';
import { spawn } from 'child_process';
import * as dotenv from 'dotenv';
import { sync as globSync } from 'glob';
import { resolve } from 'path';
import { promisify } from 'util';

import { validate } from './lib/validate';
import { registrySetup } from './registrySetup';

const asyncExec = promisify(exec);
function asyncExec(command: string, options: { env: Record<string, string | undefined>; cwd: string }): Promise<void> {
return new Promise((resolve, reject) => {
const process = spawn(command, { ...options, shell: true });

process.stdout.on('data', data => {
console.log(`${data}`);
});

process.stderr.on('data', data => {
console.error(`${data}`);
});

process.on('error', error => {
reject(error);
});

process.on('close', code => {
if (code !== 0) {
return reject();
}
resolve();
});
});
}

async function run(): Promise<void> {
// Load environment variables from .env file locally
Expand All @@ -31,8 +53,13 @@ async function run(): Promise<void> {
const env = { ...process.env, ...envVarsToInject };

try {
console.log('Cleaning test-applications...');
console.log('');

registrySetup();

await asyncExec('pnpm clean:test-applications', { env, cwd: __dirname });

const testAppPaths = appName ? [appName.trim()] : globSync('*', { cwd: `${__dirname}/test-applications/` });

console.log(`Runnings tests for: ${testAppPaths.join(', ')}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"build": "next build",
"clean": "npx rimraf node_modules,pnpm-lock.yaml",
"test:prod": "TEST_ENV=prod playwright test",
"test:dev": "TEST_ENV=dev playwright test",
"test:build": "pnpm install && npx playwright install && pnpm build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"clean": "npx rimraf node_modules,pnpm-lock.yaml",
"test:build": "pnpm install && pnpm build",
"test:build-ts3.8": "pnpm install && pnpm add typescript@3.8 && pnpm build",
"test:build-canary": "pnpm install && pnpm add react@canary react-dom@canary && pnpm build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dev": "remix dev",
"start": "remix-serve build",
"typecheck": "tsc",
"clean": "npx rimraf node_modules,pnpm-lock.yaml",
"test:build": "pnpm install && npx playwright install && pnpm build",
"test:assert": "pnpm playwright test"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"build": "next build > .tmp_build_output",
"clean": "npx rimraf node_modules,pnpm-lock.yaml",
"test:prod": "TEST_ENV=production playwright test",
"test:dev": "TEST_ENV=development playwright test",
"test:build": "pnpm install && npx playwright install && pnpm build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build": "tsc",
"start": "node dist/app.js",
"test": "playwright test",
"clean": "npx rimraf node_modules,pnpm-lock.yaml",
"test:build": "pnpm install && pnpm build",
"test:assert": "pnpm test"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"build": "react-scripts build",
"start": "serve -s build",
"test": "playwright test",
"clean": "npx rimraf node_modules,pnpm-lock.yaml",
"test:build": "pnpm install && npx playwright install && pnpm build",
"test:build-canary": "pnpm install && pnpm add react@canary react-dom@canary && npx playwright install && pnpm build",
"test:assert": "pnpm test"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"build": "react-scripts build",
"start": "serve -s build",
"test": "playwright test",
"clean": "npx rimraf node_modules,pnpm-lock.yaml",
"test:build": "pnpm install && npx playwright install && pnpm build",
"test:assert": "pnpm test"
},
Expand Down
Loading

0 comments on commit 6f082a1

Please sign in to comment.