Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
3562521
wip
Lms24 Sep 26, 2025
263bef1
types, serialization, integration WIP
Lms24 Oct 1, 2025
b430433
create span v2 envelope
Lms24 Oct 1, 2025
f6395c7
exports
Lms24 Oct 2, 2025
35ac34d
apply ignorespans, improve beforesendspan, handle segment span being …
Lms24 Oct 2, 2025
5dfb88a
apply common attributes
Lms24 Oct 3, 2025
152542f
linter really doesn't like me and I can't blame him
Lms24 Oct 3, 2025
c9c58bb
apply scope contexts, extras, request data attributes
Lms24 Oct 3, 2025
372ed82
cleanup
Lms24 Oct 14, 2025
6511caa
changelog entry
Lms24 Oct 14, 2025
af6ce0b
size-limit bumps
Lms24 Oct 14, 2025
40665a4
fix lint, circular deps, size limit
Lms24 Oct 14, 2025
416d276
bump preview version
Lms24 Oct 15, 2025
493b5ee
s/makeV2Callback/withStreamSpan
Lms24 Oct 15, 2025
47fdac8
add todos for event processors and integration hooks
Lms24 Oct 15, 2025
9a6cdf7
changelog
Lms24 Oct 16, 2025
38f4168
export withStreamSpan from browser
Lms24 Oct 16, 2025
433fe91
changelog
Lms24 Oct 16, 2025
5ac0a75
fix some attribute mishaps
Lms24 Oct 31, 2025
dd84ab4
remove is_remote, add is_segment
Lms24 Nov 10, 2025
dd9ccb4
add `sentry.segment.id` common span attribute
Lms24 Nov 10, 2025
762fc72
rip span kind
Lms24 Nov 12, 2025
c56d2dd
restart ci
Lms24 Nov 12, 2025
8d590f7
does this fix size limit?
Lms24 Nov 21, 2025
1dcc81f
s/user.username/user.name
Lms24 Nov 25, 2025
a81d126
rewrite to `captureSpan`
Lms24 Nov 28, 2025
c8a4627
capturespan
Lms24 Nov 28, 2025
100d12e
add integration test for pageload span
Lms24 Dec 1, 2025
1b261a2
more integration tests
Lms24 Dec 1, 2025
fdbe925
span links test
Lms24 Dec 1, 2025
638f4b6
set web vitals as attributes in span-first
Lms24 Dec 2, 2025
8f88dee
rewrite httpContext integration to use processSpan client hook
Lms24 Dec 2, 2025
4cd2ced
minor lint stuff
Lms24 Dec 4, 2025
62af14b
initial StreamingSpanExporter implementation for otel
Lms24 Dec 4, 2025
c640522
rewrite pipeline to just always use spanJSonV2 because thanks OTel
Lms24 Dec 5, 2025
9085239
wip
Lms24 Dec 10, 2025
f631705
add exporter
Lms24 Dec 10, 2025
800b9e1
more contexts
Lms24 Dec 10, 2025
a2e5f0e
add unit tests for captureSpan pipeline and utils
Lms24 Dec 11, 2025
d5504ee
add another test for scope attribute precedence over contexts
Lms24 Dec 12, 2025
4ee302c
Potential fix for code scanning alert no. 424: Missing regular expres…
Lms24 Dec 12, 2025
954043e
fix lint errors
Lms24 Dec 12, 2025
e5931bf
skip integration tests for cdn bundles
Lms24 Dec 12, 2025
4b88210
fix missing exports of `withStreamSpan`
Lms24 Dec 12, 2025
a2b1993
apply request data to segment span
Lms24 Dec 15, 2025
e19ac21
register a bunch of known contexts
Lms24 Dec 15, 2025
9e759b7
use new attribute serialization for spanv2
Lms24 Dec 15, 2025
6427c79
remove unused code
Lms24 Dec 15, 2025
43e7bf9
flush buffer when `Sentry.flush()` is called
Lms24 Dec 16, 2025
6a32ddb
extract span buffer to class, add serverSpanStreamingIntegration, use…
Lms24 Dec 16, 2025
817c690
raise size limits
Lms24 Dec 17, 2025
28ff42b
save some bytes in httpContext integration when tree-shaking tracing
Lms24 Dec 17, 2025
0c07834
fix test flakiness
Lms24 Dec 18, 2025
c562184
fix regex
Lms24 Dec 18, 2025
6d584f7
set `sentry.span.source` attribute
Lms24 Jan 9, 2026
25785b1
update with improved span serialization logic from scope attribute PRs
Lms24 Jan 9, 2026
16f3871
remove redundant attribute serilaization functions
Lms24 Jan 9, 2026
487004c
spanStreamingIntegration everywhere
Lms24 Jan 9, 2026
e84a9e7
use `SpanBuffer` in browser
Lms24 Jan 9, 2026
e7f6429
fixups and failing node integration tests :)
Lms24 Jan 14, 2026
679792b
add web vital support
Lms24 Jan 19, 2026
5ab0f52
feat(test-utils): Add a way to wait for single spans for Span streami…
JPeer264 Jan 28, 2026
ffb524a
web vitals wip
Lms24 Jan 30, 2026
bd0bfb1
add plan for step-by-step migration
Lms24 Jan 30, 2026
a398126
docs: Mark PR 1 as completed in span streaming plan
Lms24 Jan 30, 2026
47ae0f1
skip failing WIP tests to get an alpha out
Lms24 Feb 11, 2026
b398a6e
fix some more tests
Lms24 Feb 11, 2026
4cb67de
size limit, skip tests, fix things
Lms24 Feb 11, 2026
8da6036
fix cls unit tests
Lms24 Feb 11, 2026
c4840f6
weird formatting stuff ??
Lms24 Feb 12, 2026
754c828
lint
Lms24 Feb 12, 2026
cd5f63e
fix unit tests
Lms24 Feb 12, 2026
42fc7d8
fix integration tests
Lms24 Feb 12, 2026
ed10bc1
fix e2e tests
Lms24 Feb 12, 2026
6fdc08d
export spanstreamingIntegration from tracing cdn bundles
Lms24 Feb 12, 2026
8d16cc2
more bundle index fiels
Lms24 Feb 12, 2026
a428809
fix tests now? please?
Lms24 Feb 12, 2026
c7a3465
size limit once again :(
Lms24 Feb 12, 2026
3918e2a
add replayId
Lms24 Feb 13, 2026
ad86a57
profiler id and fix deno tests
Lms24 Feb 13, 2026
0214b26
lint
Lms24 Feb 13, 2026
7c0dc6a
fix tests
Lms24 Feb 13, 2026
1175092
fix last failing e2e test
Lms24 Feb 13, 2026
957ccf8
disable codecov check to avoid future release blockers
Lms24 Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
703 changes: 703 additions & 0 deletions .cursor/plans/span_streaming_prs_43411dc5.plan.md

Large diffs are not rendered by default.

90 changes: 45 additions & 45 deletions .size-limit.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ module.exports = [
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init'),
gzip: true,
limit: '26 KB',
limit: '27 KB',
},
{
name: '@sentry/browser - with treeshaking flags',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init'),
gzip: true,
limit: '24.1 KB',
limit: '26 KB',
modifyWebpackConfig: function (config) {
const webpack = require('webpack');

Expand All @@ -38,21 +38,28 @@ module.exports = [
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'browserTracingIntegration'),
gzip: true,
limit: '43 KB',
limit: '44 KB',
},
{
name: '@sentry/browser (incl. Tracing, Profiling)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'browserTracingIntegration', 'browserProfilingIntegration'),
gzip: true,
limit: '48 KB',
limit: '49 KB',
},
// {
// name: '@sentry/browser (incl. Tracing Span-First)',
// path: 'packages/browser/build/npm/esm/index.js',
// import: createImport('init', 'browserTracingIntegration', 'spanStreamingIntegration'),
// gzip: true,
// limit: '44 KB',
// },
{
name: '@sentry/browser (incl. Tracing, Replay)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration'),
gzip: true,
limit: '82 KB',
limit: '83 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay) - with treeshaking flags',
Expand Down Expand Up @@ -82,56 +89,56 @@ module.exports = [
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'replayCanvasIntegration'),
gzip: true,
limit: '86 KB',
limit: '88 KB',
},
{
name: '@sentry/browser (incl. Tracing, Replay, Feedback)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'browserTracingIntegration', 'replayIntegration', 'feedbackIntegration'),
gzip: true,
limit: '99 KB',
limit: '100 KB',
},
{
name: '@sentry/browser (incl. Feedback)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'feedbackIntegration'),
gzip: true,
limit: '43 KB',
limit: '44 KB',
},
{
name: '@sentry/browser (incl. sendFeedback)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'sendFeedback'),
gzip: true,
limit: '31 KB',
limit: '32 KB',
},
{
name: '@sentry/browser (incl. FeedbackAsync)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'feedbackAsyncIntegration'),
gzip: true,
limit: '36 KB',
limit: '37 KB',
},
{
name: '@sentry/browser (incl. Metrics)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'metrics'),
gzip: true,
limit: '27 KB',
limit: '28 KB',
},
{
name: '@sentry/browser (incl. Logs)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'logger'),
gzip: true,
limit: '27 KB',
limit: '28 KB',
},
{
name: '@sentry/browser (incl. Metrics & Logs)',
path: 'packages/browser/build/npm/esm/prod/index.js',
import: createImport('init', 'metrics', 'logger'),
gzip: true,
limit: '28 KB',
limit: '29 KB',
},
// React SDK (ESM)
{
Expand All @@ -140,38 +147,38 @@ module.exports = [
import: createImport('init', 'ErrorBoundary'),
ignore: ['react/jsx-runtime'],
gzip: true,
limit: '28 KB',
limit: '29 KB',
},
{
name: '@sentry/react (incl. Tracing)',
path: 'packages/react/build/esm/index.js',
import: createImport('init', 'ErrorBoundary', 'reactRouterV6BrowserTracingIntegration'),
ignore: ['react/jsx-runtime'],
gzip: true,
limit: '45 KB',
limit: '47 KB',
},
// Vue SDK (ESM)
{
name: '@sentry/vue',
path: 'packages/vue/build/esm/index.js',
import: createImport('init'),
gzip: true,
limit: '31 KB',
limit: '32 KB',
},
{
name: '@sentry/vue (incl. Tracing)',
path: 'packages/vue/build/esm/index.js',
import: createImport('init', 'browserTracingIntegration'),
gzip: true,
limit: '45 KB',
limit: '46 KB',
},
// Svelte SDK (ESM)
{
name: '@sentry/svelte',
path: 'packages/svelte/build/esm/index.js',
import: createImport('init'),
gzip: true,
limit: '26 KB',
limit: '27 KB',
},
// Browser CDN bundles
{
Expand All @@ -184,19 +191,19 @@ module.exports = [
name: 'CDN Bundle (incl. Tracing)',
path: createCDNPath('bundle.tracing.min.js'),
gzip: true,
limit: '44 KB',
limit: '46 KB',
},
{
name: 'CDN Bundle (incl. Logs, Metrics)',
path: createCDNPath('bundle.logs.metrics.min.js'),
gzip: true,
limit: '29 KB',
limit: '30 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Logs, Metrics)',
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
gzip: true,
limit: '45 KB',
limit: '47 KB',
},
{
name: 'CDN Bundle (incl. Replay, Logs, Metrics)',
Expand All @@ -208,89 +215,82 @@ module.exports = [
name: 'CDN Bundle (incl. Tracing, Replay)',
path: createCDNPath('bundle.tracing.replay.min.js'),
gzip: true,
limit: '81 KB',
limit: '83 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics)',
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
gzip: true,
limit: '81 KB',
limit: '84 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Feedback)',
path: createCDNPath('bundle.tracing.replay.feedback.min.js'),
gzip: true,
limit: '86 KB',
limit: '89 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)',
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
gzip: true,
limit: '87 KB',
limit: '90 KB',
},
// browser CDN bundles (non-gzipped)
{
name: 'CDN Bundle - uncompressed',
path: createCDNPath('bundle.min.js'),
gzip: false,
brotli: false,
limit: '83 KB',
limit: '85 KB',
},
{
name: 'CDN Bundle (incl. Tracing) - uncompressed',
path: createCDNPath('bundle.tracing.min.js'),
gzip: false,
brotli: false,
limit: '128 KB',
},
{
name: 'CDN Bundle (incl. Logs, Metrics) - uncompressed',
path: createCDNPath('bundle.logs.metrics.min.js'),
gzip: false,
brotli: false,
limit: '86 KB',
limit: '136 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed',
path: createCDNPath('bundle.tracing.logs.metrics.min.js'),
gzip: false,
brotli: false,
limit: '131 KB',
limit: '140 KB',
},
{
name: 'CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed',
path: createCDNPath('bundle.replay.logs.metrics.min.js'),
gzip: false,
brotli: false,
limit: '209 KB',
limit: '212 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay) - uncompressed',
path: createCDNPath('bundle.tracing.replay.min.js'),
gzip: false,
brotli: false,
limit: '245 KB',
limit: '254 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed',
path: createCDNPath('bundle.tracing.replay.logs.metrics.min.js'),
gzip: false,
brotli: false,
limit: '250 KB',
limit: '257 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed',
path: createCDNPath('bundle.tracing.replay.feedback.min.js'),
gzip: false,
brotli: false,
limit: '264 KB',
limit: '267 KB',
},
{
name: 'CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed',
path: createCDNPath('bundle.tracing.replay.feedback.logs.metrics.min.js'),
gzip: false,
brotli: false,
limit: '264 KB',
limit: '269 KB',
},
// Next.js SDK (ESM)
{
Expand All @@ -299,7 +299,7 @@ module.exports = [
import: createImport('init'),
ignore: ['next/router', 'next/constants'],
gzip: true,
limit: '48 KB',
limit: '49 KB',
},
// SvelteKit SDK (ESM)
{
Expand All @@ -308,7 +308,7 @@ module.exports = [
import: createImport('init'),
ignore: ['$app/stores'],
gzip: true,
limit: '43 KB',
limit: '45 KB',
},
// Node-Core SDK (ESM)
{
Expand All @@ -326,14 +326,14 @@ module.exports = [
import: createImport('init'),
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '167 KB',
limit: '170 KB',
},
{
name: '@sentry/node - without tracing',
path: 'packages/node/build/esm/index.js',
import: createImport('initWithoutDefaultIntegrations', 'getDefaultIntegrationsWithoutPerformance'),
gzip: true,
limit: '95 KB',
limit: '98 KB',
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
modifyWebpackConfig: function (config) {
const webpack = require('webpack');
Expand All @@ -356,7 +356,7 @@ module.exports = [
import: createImport('init'),
ignore: [...builtinModules, ...nodePrefixedBuiltinModules],
gzip: true,
limit: '111 KB',
limit: '114 KB',
},
];

Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"angular.enable-strict-mode-prompt": false
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,16 @@ Work in this release was contributed by @hanseo0507. Thank you for your contribu

Work in this release was contributed by @0xbad0c0d3. Thank you for your contribution!

## 10.21.0-alpha.1

This release is a preview release for sending spans in browser via spanV2 instead of transaction event envelopes. All of this is experimental and subject to change. Use at your own risk. [More Details.](https://github.com/getsentry/sentry-javascript/pull/17852)

- export withStreamSpan from `@sentry/browser`

## 10.21.0-alpha.0

This release is a preview release for sending spans in browser via spanV2 instead of transaction event envelopes. All of this is experimental and subject to change. Use at your own risk. [More Details.](https://github.com/getsentry/sentry-javascript/pull/17852)

## 10.20.0

### Important Changes
Expand Down
4 changes: 1 addition & 3 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ coverage:
round: down
range: '0...1'
status:
project:
default:
enabled: no
project: false
patch:
default:
enabled: no
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import * as Sentry from '@sentry/browser';

window.Sentry = Sentry;

Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
traceLifecycle: 'stream',
integrations: [Sentry.browserTracingIntegration(), Sentry.spanStreamingIntegration()],
tracePropagationTargets: ['http://sentry-test-site.example'],
tracesSampleRate: 1,
sendDefaultPii: true,
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
document.getElementById('go-background').addEventListener('click', () => {
setTimeout(() => {
Object.defineProperty(document, 'hidden', { value: true, writable: true });
const ev = document.createEvent('Event');
ev.initEvent('visibilitychange');
document.dispatchEvent(ev);
}, 250);
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<button id="go-background">New Tab</button>
</body>
</html>
Loading
Loading