Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.
Merged
Changes from all commits
Commits
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
12 changes: 11 additions & 1 deletion src/docs/sdk/performance/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Copy link
Contributor

@mattjohnsonpint mattjohnsonpint Dec 12, 2022

Choose a reason for hiding this comment

The 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?

Copy link
Member Author

Choose a reason for hiding this comment

The 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`
Expand Down