docs(js): Update Extended Configuration pages for stream mode#17879
docs(js): Update Extended Configuration pages for stream mode#17879inventarSarah wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| { name: 'startTime', type: 'number', description: 'The timestamp to use for the span start. If not provided, the current time will be used.' }, | ||
| { name: 'op', type: 'string', description: 'The operation name for the span. This is used to group spans in the UI' }, | ||
| { name: 'forceTransaction', type: 'boolean', description: 'If true, the span will be forced to be sent as a transaction, even if it is not the root span.' }, | ||
| { name: 'forceTransaction', type: 'boolean', description: 'If true, the span will be forced to be sent as a transaction, even if it is not the root span. \n// Not available in stream mode. Use `parentSpan: null` instead to make this span show up as service span.' }, |
There was a problem hiding this comment.
Adding "\n" like this works, but I am not sure if it's "allowed" ;)
{ ... description: 'If true,... \n// Not available in stream mode. Use `parentSpan: null` instead to make this span show up as service span.' },
| ```javascript {tabTitle:Stream Mode} | ||
| Sentry.init({ | ||
| dsn: "___PUBLIC_DSN___", | ||
| beforeSendSpan(span) { |
There was a problem hiding this comment.
Should this include the Sentry.withStreamedSpan() wrapper?
There was a problem hiding this comment.
Yes, it should -- updated 👍
| | Transaction Mode (`SpanJSON`) | Stream Mode (`StreamedSpanJSON`) | | ||
| | ---------------------------------- | ----------------------------------- | | ||
| | `span.description` | `span.name` | | ||
| | `span.data` (processed attributes) | `span.attributes` (raw attributes) | |
There was a problem hiding this comment.
Should we add more about name and span.op here, like we do in filtering?
There was a problem hiding this comment.
I added an Expandable with the code examples from the Filtering page below -- or did you mean something different?
|
|
||
| - `'manual'` (default): You control when profiling starts and stops using the `startProfiler()` and `stopProfiler()` functions. In this mode, profile sampling is only affected by `profileSessionSampleRate`.<PlatformSection notSupported={["javascript.bun", "javascript.cordova", "javascript.capacitor", "javascript.deno", "javascript.cloudflare"]}> Read more about these functions in the <PlatformLink to="/profiling">profiling API documentation</PlatformLink>.</PlatformSection> | ||
| - `'trace'`: Profiling starts and stops automatically with transactions, as long as tracing is enabled. The profiler runs as long as there is at least one sampled transaction. In this mode, profiling is affected by both `profileSessionSampleRate` and your tracing sample rate (`tracesSampleRate` or `tracesSampler`). | ||
| - `'trace'`: Profiling starts and stops automatically with transactions (or service span if you're using <PlatformLink to="/tracing/new-spans">stream mode</PlatformLink>), as long as tracing is enabled. The profiler runs as long as there is at least one sampled transaction. In this mode, profiling is affected by both `profileSessionSampleRate` and your tracing sample rate (`tracesSampleRate` or `tracesSampler`). |
There was a problem hiding this comment.
| - `'trace'`: Profiling starts and stops automatically with transactions (or service span if you're using <PlatformLink to="/tracing/new-spans">stream mode</PlatformLink>), as long as tracing is enabled. The profiler runs as long as there is at least one sampled transaction. In this mode, profiling is affected by both `profileSessionSampleRate` and your tracing sample rate (`tracesSampleRate` or `tracesSampler`). | |
| - `'trace'`: Profiling starts and stops automatically with transactions (or service spans if you're using <PlatformLink to="/tracing/new-spans">stream mode</PlatformLink>), as long as tracing is enabled. The profiler runs as long as there is at least one sampled transaction. In this mode, profiling is affected by both `profileSessionSampleRate` and your tracing sample rate (`tracesSampleRate` or `tracesSampler`). |
| If you want to drop the transaction/service span, including its child spans: | ||
|
|
||
| - Use [`beforeSendTransaction`](#using-beforesendtransaction) in transaction mode. | ||
| - Use [`ignoreSpans`](#using-ignore-spans) in stream mode. |
There was a problem hiding this comment.
Do we need to mention the withStreamedSpan() wrapper here too?
There was a problem hiding this comment.
thank you, great catch!
-> added wrapper info
sfanahata
left a comment
There was a problem hiding this comment.
Content wise this looks fine, with a couple of questions about adding/referencing the same info across these pages. See comments for details.
…an-first/js-config-updates
DESCRIBE YOUR PR
This branch contains updated APIs, Options, and Filter page content for stream mode/new spans.
The PR is currently in Draft because we have two additional PRs open, which cover the same content. I will update this branch with any feedback on these PRs before marking it ready for review.
Closes: #17837
Important
Must only be merged after #17834
This branch is separate from this PR and thus does not contain the new /tracing/new-spans page. However, this branch adds links to that page, which the 404 Linter identifies correctly as broken
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
EXTRA RESOURCES