This repository was archived by the owner on Aug 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 218
feat: Docs for Sentry.span #781
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -219,11 +219,21 @@ Which in reality is useful for proxies to set it to `0` and opt out of tracing. | |
| ## Static API Changes | ||
|
|
||
| The `Sentry.startTransaction` function should take two arguments - the `transactionContext` passed to the `Transaction` constructor and an optional `customSamplingContext` object containing data to be passed to `tracesSampler` (if defined). | ||
|
|
||
| It creates a `Transaction` bound to the current hub and returns the instance. | ||
| Users interact with the instance for creating child spans and, thus, have to | ||
| keep track of it themselves. | ||
|
|
||
| With `Sentry.span` users can attach spans to an already ongoing transaction. | ||
| This property returns a `SpanProtocol` if a running transaction is bound to | ||
philipphofmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| the scope; otherwise, it returns nil. Although we recommend users keep track | ||
| of their own transactions, the SDKs should offer a way to expose auto-generated | ||
| transactions. SDKs shall bind auto-generated transactions to the scope, making | ||
| them accessible with `Sentry.span`. | ||
| If the SDK has global mode enabled, which specifies whether to use global scope | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bruno-garcia - I don't think we currently have defined "global mode" in the unified API spec yet. Have we?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm unsure if we want to add this to the unified API spec. |
||
| management mode and should be `true` for client applications and `false` for server | ||
| applications, `Sentry.span` shall return the active transaction. If the | ||
| user disables global mode, `Sentry.span` shall return the latest active (unfinished) span. | ||
|
|
||
| ## `Hub` Changes | ||
|
|
||
| - Introduce a method called `traceHeaders` | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.