Skip to content

Commit

Permalink
Merge pull request #15454 from getsentry/prepare-release/9.2.0
Browse files Browse the repository at this point in the history
meta: Update changelog for 9.2.0
  • Loading branch information
Lms24 authored Feb 24, 2025
2 parents 82598f5 + 12425e2 commit e730bc2
Show file tree
Hide file tree
Showing 217 changed files with 6,304 additions and 739 deletions.
4 changes: 2 additions & 2 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module.exports = [
path: 'packages/browser/build/npm/esm/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration'),
gzip: true,
limit: '68 KB',
limit: '70 KB',
modifyWebpackConfig: function (config) {
const webpack = require('webpack');
const TerserPlugin = require('terser-webpack-plugin');
Expand Down Expand Up @@ -210,7 +210,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '40 KB',
limit: '41 KB',
},
// SvelteKit SDK (ESM)
{
Expand Down
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,46 @@

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

## 9.2.0

### Important Changes

- **feat(node): Support Express v5 ([#15380](https://github.com/getsentry/sentry-javascript/pull/15380))**

This release adds full tracing support for Express v5, and improves tracing support for Nest.js 11 (which uses Express v5) in the Nest.js SDK.

- **feat(sveltekit): Add Support for Cloudflare ([#14672](https://github.com/getsentry/sentry-javascript/pull/14672))**

This release adds support for deploying SvelteKit applications to Cloudflare Pages.
A docs update with updated instructions will follow shortly.
Until then, you can give this a try by setting up the SvelteKit SDK as usual and then following the instructions outlined in the PR.

Thank you @SG60 for contributing this feature!

### Other Changes

- feat(core): Add `addLink(s)` to Sentry span ([#15452](https://github.com/getsentry/sentry-javascript/pull/15452))
- feat(core): Add links to span options ([#15453](https://github.com/getsentry/sentry-javascript/pull/15453))
- feat(deps): Bump @sentry/webpack-plugin from 2.22.7 to 3.1.2 ([#15328](https://github.com/getsentry/sentry-javascript/pull/15328))
- feat(feedback): Disable Feedback submit & cancel buttons while submitting ([#15408](https://github.com/getsentry/sentry-javascript/pull/15408))
- feat(nextjs): Add experimental flag to not strip origin information from different origin stack frames ([#15418](https://github.com/getsentry/sentry-javascript/pull/15418))
- feat(nuxt): Add `enableNitroErrorHandler` to server options ([#15444](https://github.com/getsentry/sentry-javascript/pull/15444))
- feat(opentelemetry): Add `addLink(s)` to span ([#15387](https://github.com/getsentry/sentry-javascript/pull/15387))
- feat(opentelemetry): Add `links` to span options ([#15403](https://github.com/getsentry/sentry-javascript/pull/15403))
- feat(replay): Expose rrweb recordCrossOriginIframes under \_experiments ([#14916](https://github.com/getsentry/sentry-javascript/pull/14916))
- fix(browser): Ensure that `performance.measure` spans have a positive duration ([#15415](https://github.com/getsentry/sentry-javascript/pull/15415))
- fix(bun): Includes correct sdk metadata ([#15459](https://github.com/getsentry/sentry-javascript/pull/15459))
- fix(core): Add Google `gmo` error to Inbound Filters ([#15432](https://github.com/getsentry/sentry-javascript/pull/15432))
- fix(core): Ensure `http.client` span descriptions don't contain query params or fragments ([#15404](https://github.com/getsentry/sentry-javascript/pull/15404))
- fix(core): Filter out unactionable Facebook Mobile browser error ([#15430](https://github.com/getsentry/sentry-javascript/pull/15430))
- fix(nestjs): Pin dependency on `@opentelemetry/instrumentation` ([#15419](https://github.com/getsentry/sentry-javascript/pull/15419))
- fix(nuxt): Only use filename with file extension from command ([#15445](https://github.com/getsentry/sentry-javascript/pull/15445))
- fix(nuxt): Use `SentryNuxtServerOptions` type for server init ([#15441](https://github.com/getsentry/sentry-javascript/pull/15441))
- fix(sveltekit): Avoid loading vite config to determine source maps setting ([#15440](https://github.com/getsentry/sentry-javascript/pull/15440))
- ref(profiling-node): Bump chunk interval to 60s ([#15361](https://github.com/getsentry/sentry-javascript/pull/15361))

Work in this release was contributed by @6farer, @dgavranic and @SG60. Thank you for your contributions!

## 9.1.0

- feat(browser): Add `graphqlClientIntegration` ([#13783](https://github.com/getsentry/sentry-javascript/pull/13783))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
integrations: [],
tracesSampleRate: 1,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// REGULAR ---
const rootSpan1 = Sentry.startInactiveSpan({ name: 'rootSpan1' });
rootSpan1.end();

Sentry.startSpan({ name: 'rootSpan2' }, rootSpan2 => {
rootSpan2.addLink({
context: rootSpan1.spanContext(),
attributes: { 'sentry.link.type': 'previous_trace' },
});
});

// NESTED ---
Sentry.startSpan({ name: 'rootSpan3' }, async rootSpan3 => {
Sentry.startSpan({ name: 'childSpan3.1' }, async childSpan1 => {
childSpan1.addLink({
context: rootSpan1.spanContext(),
attributes: { 'sentry.link.type': 'previous_trace' },
});

childSpan1.end();
});

Sentry.startSpan({ name: 'childSpan3.2' }, async childSpan2 => {
childSpan2.addLink({ context: rootSpan3.spanContext() });

childSpan2.end();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { expect } from '@playwright/test';
import type { SpanJSON, TransactionEvent } from '@sentry/core';
import { sentryTest } from '../../../utils/fixtures';
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../utils/helpers';

sentryTest('should link spans with addLink() in trace context', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const rootSpan1Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan1');
const rootSpan2Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan2');

const url = await getLocalTestUrl({ testDir: __dirname });
await page.goto(url);

const rootSpan1 = envelopeRequestParser<TransactionEvent>(await rootSpan1Promise);
const rootSpan2 = envelopeRequestParser<TransactionEvent>(await rootSpan2Promise);

const rootSpan1_traceId = rootSpan1.contexts?.trace?.trace_id as string;
const rootSpan1_spanId = rootSpan1.contexts?.trace?.span_id as string;

expect(rootSpan1.transaction).toBe('rootSpan1');
expect(rootSpan1.spans).toEqual([]);

expect(rootSpan2.transaction).toBe('rootSpan2');
expect(rootSpan2.spans).toEqual([]);

expect(rootSpan2.contexts?.trace?.links?.length).toBe(1);
expect(rootSpan2.contexts?.trace?.links?.[0]).toMatchObject({
attributes: { 'sentry.link.type': 'previous_trace' },
sampled: true,
span_id: rootSpan1_spanId,
trace_id: rootSpan1_traceId,
});
});

sentryTest('should link spans with addLink() in nested startSpan() calls', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const rootSpan1Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan1');
const rootSpan3Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan3');

const url = await getLocalTestUrl({ testDir: __dirname });
await page.goto(url);

const rootSpan1 = envelopeRequestParser<TransactionEvent>(await rootSpan1Promise);
const rootSpan3 = envelopeRequestParser<TransactionEvent>(await rootSpan3Promise);

const rootSpan1_traceId = rootSpan1.contexts?.trace?.trace_id as string;
const rootSpan1_spanId = rootSpan1.contexts?.trace?.span_id as string;

const [childSpan_3_1, childSpan_3_2] = rootSpan3.spans as [SpanJSON, SpanJSON];
const rootSpan3_traceId = rootSpan3.contexts?.trace?.trace_id as string;
const rootSpan3_spanId = rootSpan3.contexts?.trace?.span_id as string;

expect(rootSpan3.transaction).toBe('rootSpan3');

expect(childSpan_3_1.description).toBe('childSpan3.1');
expect(childSpan_3_1.links?.length).toBe(1);
expect(childSpan_3_1.links?.[0]).toMatchObject({
attributes: { 'sentry.link.type': 'previous_trace' },
sampled: true,
span_id: rootSpan1_spanId,
trace_id: rootSpan1_traceId,
});

expect(childSpan_3_2.description).toBe('childSpan3.2');
expect(childSpan_3_2.links?.[0]).toMatchObject({
sampled: true,
span_id: rootSpan3_spanId,
trace_id: rootSpan3_traceId,
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
integrations: [],
tracesSampleRate: 1,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// REGULAR ---
const rootSpan1 = Sentry.startInactiveSpan({ name: 'rootSpan1' });
rootSpan1.end();

const rootSpan2 = Sentry.startInactiveSpan({ name: 'rootSpan2' });
rootSpan2.end();

Sentry.startSpan({ name: 'rootSpan3' }, rootSpan3 => {
rootSpan3.addLinks([
{ context: rootSpan1.spanContext() },
{
context: rootSpan2.spanContext(),
attributes: { 'sentry.link.type': 'previous_trace' },
},
]);
});

// NESTED ---
Sentry.startSpan({ name: 'rootSpan4' }, async rootSpan4 => {
Sentry.startSpan({ name: 'childSpan4.1' }, async childSpan1 => {
Sentry.startSpan({ name: 'childSpan4.2' }, async childSpan2 => {
childSpan2.addLinks([
{ context: rootSpan4.spanContext() },
{
context: rootSpan2.spanContext(),
attributes: { 'sentry.link.type': 'previous_trace' },
},
]);

childSpan2.end();
});

childSpan1.end();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import { expect } from '@playwright/test';
import type { SpanJSON, TransactionEvent } from '@sentry/core';
import { sentryTest } from '../../../utils/fixtures';
import { envelopeRequestParser, shouldSkipTracingTest, waitForTransactionRequest } from '../../../utils/helpers';

sentryTest('should link spans with addLinks() in trace context', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const rootSpan1Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan1');
const rootSpan2Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan2');
const rootSpan3Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan3');

const url = await getLocalTestUrl({ testDir: __dirname });
await page.goto(url);

const rootSpan1 = envelopeRequestParser<TransactionEvent>(await rootSpan1Promise);
const rootSpan2 = envelopeRequestParser<TransactionEvent>(await rootSpan2Promise);
const rootSpan3 = envelopeRequestParser<TransactionEvent>(await rootSpan3Promise);

const rootSpan1_traceId = rootSpan1.contexts?.trace?.trace_id as string;
const rootSpan1_spanId = rootSpan1.contexts?.trace?.span_id as string;

expect(rootSpan1.transaction).toBe('rootSpan1');
expect(rootSpan1.spans).toEqual([]);

const rootSpan2_traceId = rootSpan2.contexts?.trace?.trace_id as string;
const rootSpan2_spanId = rootSpan2.contexts?.trace?.span_id as string;

expect(rootSpan2.transaction).toBe('rootSpan2');
expect(rootSpan2.spans).toEqual([]);

expect(rootSpan3.transaction).toBe('rootSpan3');
expect(rootSpan3.spans).toEqual([]);
expect(rootSpan3.contexts?.trace?.links?.length).toBe(2);
expect(rootSpan3.contexts?.trace?.links).toEqual([
{
sampled: true,
span_id: rootSpan1_spanId,
trace_id: rootSpan1_traceId,
},
{
attributes: { 'sentry.link.type': 'previous_trace' },
sampled: true,
span_id: rootSpan2_spanId,
trace_id: rootSpan2_traceId,
},
]);
});

sentryTest('should link spans with addLinks() in nested startSpan() calls', async ({ getLocalTestUrl, page }) => {
if (shouldSkipTracingTest()) {
sentryTest.skip();
}

const rootSpan2Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan2');
const rootSpan4Promise = waitForTransactionRequest(page, event => event.transaction === 'rootSpan4');

const url = await getLocalTestUrl({ testDir: __dirname });
await page.goto(url);

const rootSpan2 = envelopeRequestParser<TransactionEvent>(await rootSpan2Promise);
const rootSpan4 = envelopeRequestParser<TransactionEvent>(await rootSpan4Promise);

const rootSpan2_traceId = rootSpan2.contexts?.trace?.trace_id as string;
const rootSpan2_spanId = rootSpan2.contexts?.trace?.span_id as string;

const [childSpan_4_1, childSpan_4_2] = rootSpan4.spans as [SpanJSON, SpanJSON];
const rootSpan4_traceId = rootSpan4.contexts?.trace?.trace_id as string;
const rootSpan4_spanId = rootSpan4.contexts?.trace?.span_id as string;

expect(rootSpan4.transaction).toBe('rootSpan4');

expect(childSpan_4_1.description).toBe('childSpan4.1');
expect(childSpan_4_1.links).toBe(undefined);

expect(childSpan_4_2.description).toBe('childSpan4.2');
expect(childSpan_4_2.links?.length).toBe(2);
expect(childSpan_4_2.links).toEqual([
{
sampled: true,
span_id: rootSpan4_spanId,
trace_id: rootSpan4_traceId,
},
{
attributes: { 'sentry.link.type': 'previous_trace' },
sampled: true,
span_id: rootSpan2_spanId,
trace_id: rootSpan2_traceId,
},
]);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://[email protected]/1337',
integrations: [],
tracesSampleRate: 1,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const rootSpan1 = Sentry.startInactiveSpan({ name: 'rootSpan1' });
rootSpan1.end();

const rootSpan2 = Sentry.startInactiveSpan({ name: 'rootSpan2' });
rootSpan2.end();

Sentry.startSpan(
{
name: 'rootSpan3',
links: [
{ context: rootSpan1.spanContext() },
{ context: rootSpan2.spanContext(), attributes: { 'sentry.link.type': 'previous_trace' } },
],
},
async () => {
Sentry.startSpan({ name: 'childSpan3.1' }, async childSpan1 => {
childSpan1.end();
});
},
);
Loading

0 comments on commit e730bc2

Please sign in to comment.