sentry-span-streaming-js

Migrate JavaScript Sentry projects from transaction-based tracing to per-span streaming.

1|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/getsentry/plugin-claude --skill sentry-span-streaming-js
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sentry-span-streaming-js
Source: https://github.com/getsentry/plugin-claude/tree/main/skills/sentry-span-streaming-js
Command: npx skills add https://github.com/getsentry/plugin-claude --skill sentry-span-streaming-js

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrates a JavaScript project from transaction-based tracing to per-span streaming to reduce latency and improve real-time visibility.

Core Features & Use Cases

  • Enable span streaming by adding the span streaming integration in client code and setting traceLifecycle to 'stream' on server configurations.
  • Wrap beforeSendSpan with Sentry.withStreamedSpan() and convert callback shapes from SpanJSON to StreamedSpanJSON to ensure correct behavior.
  • Remove or replace beforeSendTransaction logic with ignoreSpans or beforeSendSpan-based filtering for per-span control.

Quick Start

Update Sentry initialization in your JavaScript project to enable span streaming in both client and server configurations.

Frequently Asked Questions about sentry-span-streaming-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate from Sentry transaction-based tracing to per-span streaming in JavaScript?▼

To migrate to per-span streaming, add the span streaming integration, set traceLifecycle to 'stream' on servers, and wrap beforeSendSpan with Sentry.withStreamedSpan() for correct callback behavior.

What is Sentry span streaming and when do I need it in my JavaScript project?▼

Sentry span streaming is a tracing method that sends spans individually instead of batching them in transactions. You need it to reduce latency and improve real-time visibility in browser and server environments.

Do I need a specific Sentry SDK version to enable span streaming?▼

Yes, enabling span streaming requires Sentry JS SDK version 10.53.1 or higher with tracing enabled in your project configuration.

How do I replace beforeSendTransaction logic when migrating to span streaming?▼

Replace beforeSendTransaction logic by using ignoreSpans or beforeSendSpan-based filtering to maintain per-span control over your tracing data during the migration.

Does Sentry span streaming work with both browser and server JavaScript configurations?▼

Yes, span streaming applies to both browser and server environments and their framework combinations, requiring configuration updates in client code and server-side traceLifecycle settings.

Why do I need to convert SpanJSON to StreamedSpanJSON callbacks during span streaming migration?▼

Converting callback shapes from SpanJSON to StreamedSpanJSON ensures correct behavior when wrapping beforeSendSpan with Sentry.withStreamedSpan() for per-span streaming.