Skip to content

Commit 05f55f1

Browse files
Merge branch 'egou/v7/feat/create-interaction-spans-on-inp' of github.com:getsentry/sentry-javascript into egou/v7/feat/add-sampling-rate-to-inp-spans
2 parents a937852 + 77f610b commit 05f55f1

File tree

68 files changed

+672
-317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+672
-317
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,9 +1055,8 @@ jobs:
10551055
'node-express-app',
10561056
'create-react-app',
10571057
'create-next-app',
1058-
# disabling remix e2e tests because of flakes
1059-
# 'create-remix-app',
1060-
# 'create-remix-app-v2',
1058+
'create-remix-app',
1059+
'create-remix-app-v2',
10611060
'debug-id-sourcemaps',
10621061
'nextjs-app-dir',
10631062
'nextjs-14',

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,32 @@
44

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

7+
## 7.103.0
8+
9+
### Important Changes
10+
11+
- **feat(core): Allow to pass `forceTransaction` to `startSpan()` APIs (#10819)**
12+
13+
You can now pass `forceTransaction: true` to `startSpan()`, `startSpanManual()` and `startInactiveSpan()`. This allows
14+
you to start a span that you want to be a transaction, if possible. Under the hood, the SDK will connect this span to
15+
the running active span (if there is one), but still send the new span as a transaction to the Sentry backend, if
16+
possible, ensuring it shows up as a transaction throughout the system.
17+
18+
Please note that setting this to `true` does not _guarantee_ that this will be sent as a transaction, but that the SDK
19+
will try to do so. You can enable this flag if this span is important to you and you want to ensure that you can see it
20+
in the Sentry UI.
21+
22+
### Other Changes
23+
24+
- fix: Make breadcrumbs option optional in WinterCGFetch integration (#10792)
25+
26+
## 7.102.1
27+
28+
- fix(performance): Fixes latest route name and source for interactions not updating properly on navigation (#10702)
29+
- fix(tracing): Guard against missing `window.location` (#10659)
30+
- ref: Make span types more robust (#10660)
31+
- ref(remix): Make `@remix-run/router` a dependency (v7) (#10779)
32+
733
## 7.102.0
834

935
- fix: Export session API (#10712)

dev-packages/browser-integration-tests/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/browser-integration-tests",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"main": "index.js",
55
"license": "MIT",
66
"engines": {
@@ -47,8 +47,8 @@
4747
"@babel/preset-typescript": "^7.16.7",
4848
"@playwright/test": "^1.40.1",
4949
"@sentry-internal/rrweb": "2.11.0",
50-
"@sentry/browser": "7.102.0",
51-
"@sentry/tracing": "7.102.0",
50+
"@sentry/browser": "7.103.0",
51+
"@sentry/tracing": "7.103.0",
5252
"axios": "1.6.0",
5353
"babel-loader": "^8.2.2",
5454
"html-webpack-plugin": "^5.5.0",

dev-packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/e2e-tests",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"license": "MIT",
55
"private": true,
66
"scripts": {

dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.client.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { StrictMode, startTransition, useEffect } from 'react';
1010
import { hydrateRoot } from 'react-dom/client';
1111

1212
Sentry.init({
13+
environment: 'qa', // dynamic sampling bias to keep transactions
1314
dsn: window.ENV.SENTRY_DSN,
1415
integrations: [
1516
new Sentry.BrowserTracing({

dev-packages/e2e-tests/test-applications/create-remix-app-v2/app/entry.server.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ installGlobals();
1919
const ABORT_DELAY = 5_000;
2020

2121
Sentry.init({
22+
environment: 'qa', // dynamic sampling bias to keep transactions
2223
dsn: process.env.E2E_TEST_DSN,
2324
// Performance Monitoring
2425
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!

dev-packages/e2e-tests/test-applications/create-remix-app-v2/remix.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ module.exports = {
66
// serverBuildPath: 'build/index.js',
77
// publicPath: '/build/',
88
serverModuleFormat: 'cjs',
9-
entry,
109
};

dev-packages/e2e-tests/test-applications/create-remix-app-v2/tests/behaviour-client.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ test('Sends a client-side exception to Sentry', async ({ page }) => {
4747
.toBe(200);
4848
});
4949

50-
// Skipping test because of flake
51-
test.skip('Sends a pageload transaction to Sentry', async ({ page }) => {
50+
test('Sends a pageload transaction to Sentry', async ({ page }) => {
5251
await page.goto('/');
5352

5453
const recordedTransactionsHandle = await page.waitForFunction(() => {
@@ -107,8 +106,7 @@ test.skip('Sends a pageload transaction to Sentry', async ({ page }) => {
107106
expect(hadPageLoadTransaction).toBe(true);
108107
});
109108

110-
// Skipped because of test flake
111-
test.skip('Sends a navigation transaction to Sentry', async ({ page }) => {
109+
test('Sends a navigation transaction to Sentry', async ({ page }) => {
112110
await page.goto('/');
113111

114112
// Give pageload transaction time to finish

dev-packages/e2e-tests/test-applications/create-remix-app/app/entry.client.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { StrictMode, startTransition, useEffect } from 'react';
1010
import { hydrateRoot } from 'react-dom/client';
1111

1212
Sentry.init({
13+
environment: 'qa', // dynamic sampling bias to keep transactions
1314
dsn: window.ENV.SENTRY_DSN,
1415
integrations: [
1516
new Sentry.BrowserTracing({

dev-packages/e2e-tests/test-applications/create-remix-app/app/entry.server.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { renderToPipeableStream } from 'react-dom/server';
1616
const ABORT_DELAY = 5_000;
1717

1818
Sentry.init({
19+
environment: 'qa', // dynamic sampling bias to keep transactions
1920
dsn: process.env.E2E_TEST_DSN,
2021
// Performance Monitoring
2122
tracesSampleRate: 1.0, // Capture 100% of the transactions, reduce in production!

dev-packages/e2e-tests/test-applications/create-remix-app/tests/behaviour-client.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ const authToken = process.env.E2E_TEST_AUTH_TOKEN;
77
const sentryTestOrgSlug = process.env.E2E_TEST_SENTRY_ORG_SLUG;
88
const sentryTestProject = process.env.E2E_TEST_SENTRY_TEST_PROJECT;
99

10-
// skipping flaky test
11-
test.skip('Sends a client-side exception to Sentry', async ({ page }) => {
10+
test('Sends a client-side exception to Sentry', async ({ page }) => {
1211
await page.goto('/');
1312

1413
const exceptionButton = page.locator('id=exception-button');
@@ -48,8 +47,7 @@ test.skip('Sends a client-side exception to Sentry', async ({ page }) => {
4847
.toBe(200);
4948
});
5049

51-
// skipping flaky test
52-
test.skip('Sends a pageload transaction to Sentry', async ({ page }) => {
50+
test('Sends a pageload transaction to Sentry', async ({ page }) => {
5351
await page.goto('/');
5452

5553
const recordedTransactionsHandle = await page.waitForFunction(() => {

dev-packages/node-integration-tests/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/node-integration-tests",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"license": "MIT",
55
"engines": {
66
"node": ">=10"
@@ -29,9 +29,9 @@
2929
"dependencies": {
3030
"@hapi/hapi": "^20.3.0",
3131
"@prisma/client": "3.15.2",
32-
"@sentry/node": "7.102.0",
33-
"@sentry/tracing": "7.102.0",
34-
"@sentry/types": "7.102.0",
32+
"@sentry/node": "7.103.0",
33+
"@sentry/tracing": "7.103.0",
34+
"@sentry/types": "7.103.0",
3535
"@types/mongodb": "^3.6.20",
3636
"@types/mysql": "^2.15.21",
3737
"@types/pg": "^8.6.5",

dev-packages/overhead-metrics/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"private": true,
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"name": "@sentry-internal/overhead-metrics",
55
"main": "index.js",
66
"author": "Sentry",

dev-packages/rollup-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry-internal/rollup-utils",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"description": "Rollup utilities used at Sentry for the Sentry JavaScript SDK",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/rollup-utils",

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"npmClient": "yarn"
55
}

packages/angular-ivy/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/angular-ivy",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"description": "Official Sentry SDK for Angular with full Ivy Support",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular-ivy",
@@ -21,10 +21,10 @@
2121
"rxjs": "^6.5.5 || ^7.x"
2222
},
2323
"dependencies": {
24-
"@sentry/browser": "7.102.0",
25-
"@sentry/core": "7.102.0",
26-
"@sentry/types": "7.102.0",
27-
"@sentry/utils": "7.102.0",
24+
"@sentry/browser": "7.103.0",
25+
"@sentry/core": "7.103.0",
26+
"@sentry/types": "7.103.0",
27+
"@sentry/utils": "7.103.0",
2828
"tslib": "^2.4.1"
2929
},
3030
"devDependencies": {

packages/angular/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/angular",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"description": "Official Sentry SDK for Angular",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
@@ -21,10 +21,10 @@
2121
"rxjs": "^6.5.5 || ^7.x"
2222
},
2323
"dependencies": {
24-
"@sentry/browser": "7.102.0",
25-
"@sentry/core": "7.102.0",
26-
"@sentry/types": "7.102.0",
27-
"@sentry/utils": "7.102.0",
24+
"@sentry/browser": "7.103.0",
25+
"@sentry/core": "7.103.0",
26+
"@sentry/types": "7.103.0",
27+
"@sentry/utils": "7.103.0",
2828
"tslib": "^2.4.1"
2929
},
3030
"devDependencies": {

packages/astro/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/astro",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"description": "Official Sentry SDK for Astro",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/astro",
@@ -49,11 +49,11 @@
4949
"astro": ">=3.x || >=4.0.0-beta"
5050
},
5151
"dependencies": {
52-
"@sentry/browser": "7.102.0",
53-
"@sentry/core": "7.102.0",
54-
"@sentry/node": "7.102.0",
55-
"@sentry/types": "7.102.0",
56-
"@sentry/utils": "7.102.0",
52+
"@sentry/browser": "7.103.0",
53+
"@sentry/core": "7.103.0",
54+
"@sentry/node": "7.103.0",
55+
"@sentry/types": "7.103.0",
56+
"@sentry/utils": "7.103.0",
5757
"@sentry/vite-plugin": "^2.8.0"
5858
},
5959
"devDependencies": {

packages/browser/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/browser",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"description": "Official Sentry SDK for browsers",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
@@ -29,16 +29,16 @@
2929
"access": "public"
3030
},
3131
"dependencies": {
32-
"@sentry-internal/feedback": "7.102.0",
33-
"@sentry-internal/replay-canvas": "7.102.0",
34-
"@sentry-internal/tracing": "7.102.0",
35-
"@sentry/core": "7.102.0",
36-
"@sentry/replay": "7.102.0",
37-
"@sentry/types": "7.102.0",
38-
"@sentry/utils": "7.102.0"
32+
"@sentry-internal/feedback": "7.103.0",
33+
"@sentry-internal/replay-canvas": "7.103.0",
34+
"@sentry-internal/tracing": "7.103.0",
35+
"@sentry/core": "7.103.0",
36+
"@sentry/replay": "7.103.0",
37+
"@sentry/types": "7.103.0",
38+
"@sentry/utils": "7.103.0"
3939
},
4040
"devDependencies": {
41-
"@sentry-internal/integration-shims": "7.102.0",
41+
"@sentry-internal/integration-shims": "7.103.0",
4242
"@types/md5": "2.1.33",
4343
"btoa": "^1.2.1",
4444
"chai": "^4.1.2",

packages/bun/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/bun",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"description": "Official Sentry SDK for bun",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/bun",
@@ -29,10 +29,10 @@
2929
"access": "public"
3030
},
3131
"dependencies": {
32-
"@sentry/core": "7.102.0",
33-
"@sentry/node": "7.102.0",
34-
"@sentry/types": "7.102.0",
35-
"@sentry/utils": "7.102.0"
32+
"@sentry/core": "7.103.0",
33+
"@sentry/node": "7.103.0",
34+
"@sentry/types": "7.103.0",
35+
"@sentry/utils": "7.103.0"
3636
},
3737
"devDependencies": {
3838
"bun-types": "latest"

packages/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sentry/core",
3-
"version": "7.102.0",
3+
"version": "7.103.0",
44
"description": "Base implementation for all Sentry JavaScript SDKs",
55
"repository": "git://github.com/getsentry/sentry-javascript.git",
66
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/core",
@@ -29,8 +29,8 @@
2929
"access": "public"
3030
},
3131
"dependencies": {
32-
"@sentry/types": "7.102.0",
33-
"@sentry/utils": "7.102.0"
32+
"@sentry/types": "7.103.0",
33+
"@sentry/utils": "7.103.0"
3434
},
3535
"scripts": {
3636
"build": "run-p build:transpile build:types",

packages/core/src/semanticAttributes.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,3 @@ export const SEMANTIC_ATTRIBUTE_SENTRY_OP = 'sentry.op';
1919
* Use this attribute to represent the origin of a span.
2020
*/
2121
export const SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = 'sentry.origin';
22-
23-
/**
24-
* Use this attribute to represent measurements of a span.
25-
*/
26-
export const SEMANTIC_ATTRIBUTE_MEASUREMENTS = 'measurements';

packages/core/src/tracing/span.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ import { dropUndefinedKeys, logger, timestampInSeconds, uuid4 } from '@sentry/ut
1818

1919
import { DEBUG_BUILD } from '../debug-build';
2020
import { getMetricSummaryJsonForSpan } from '../metrics/metric-summary';
21-
import {
22-
SEMANTIC_ATTRIBUTE_MEASUREMENTS,
23-
SEMANTIC_ATTRIBUTE_SENTRY_OP,
24-
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
25-
} from '../semanticAttributes';
21+
import { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '../semanticAttributes';
2622
import { getRootSpan } from '../utils/getRootSpan';
2723
import {
2824
TRACE_FLAG_NONE,
@@ -120,6 +116,9 @@ export class Span implements SpanInterface {
120116
protected _endTime?: number | undefined;
121117
/** Internal keeper of the status */
122118
protected _status?: SpanStatusType | string | undefined;
119+
protected _exclusiveTime?: number;
120+
121+
protected _measurements: Measurements;
123122

124123
private _logMessage?: string;
125124

@@ -164,6 +163,10 @@ export class Span implements SpanInterface {
164163
if (spanContext.endTimestamp) {
165164
this._endTime = spanContext.endTimestamp;
166165
}
166+
if (spanContext.exclusiveTime) {
167+
this._exclusiveTime = spanContext.exclusiveTime;
168+
}
169+
this._measurements = spanContext.measurements ? { ...spanContext.measurements } : {};
167170
}
168171

169172
// This rule conflicts with another eslint rule :(
@@ -631,7 +634,8 @@ export class Span implements SpanInterface {
631634
trace_id: this._traceId,
632635
origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined,
633636
_metrics_summary: getMetricSummaryJsonForSpan(this),
634-
measurements: this._attributes[SEMANTIC_ATTRIBUTE_MEASUREMENTS] as Measurements | undefined,
637+
exclusive_time: this._exclusiveTime,
638+
measurements: Object.keys(this._measurements).length > 0 ? this._measurements : undefined,
635639
});
636640
}
637641

0 commit comments

Comments
 (0)