The reference to the current hub.
Data of the Span.
Optional
descriptionDescription of the Span.
Optional
endTimestamp in seconds when the span ended.
The instrumenter that created this span.
Optional
opOperation of the Span.
Optional
parentParent Span ID
Optional
sampledWas this span chosen to be sent as part of the sample?
Span ID
Optional
spanList of spans that were finalized
Timestamp in seconds when the span was created.
Optional
statusInternal keeper of the status
Tags of the Span.
Trace ID
Optional
transactionThe transaction containing this span
Getter for name
property
Setter for name
property, which also sets source
as custom
Register a callback function that gets excecuted before the transaction finishes. Useful for cleanup or if you want to add any additional spans based on current context.
This is exposed because users have no other way of running something before an idle transaction finishes.
Sets the data attribute on the current span
Data key
Data value
Sets the status attribute on the current span based on the http code
http code used to set the status
Internal
Override the current hub with a new one. Used if you want another hub to finish the transaction.
JSDoc
Sets the status attribute on the current span See: {@sentry/tracing SpanStatus} for possible values
http code used to set the status
Sets the tag attribute on the current span.
Can also be used to unset a tag, by passing undefined
.
Tag key
Tag value
Creates a new Span
while setting the current Span.id
as parentSpanId
.
Also the sampled
decision will be inherited.
Optional
spanContext: Pick<SpanContext, "status" | "tags" | "data" | "description" | "op" | "instrumenter" | "spanId" | "startTimestamp" | "endTimestamp">Returns the current transaction properties as a TransactionContext
Convert the object to JSON
Optional
data?: { Optional
description?: stringOptional
op?: stringOptional
parent_Optional
status?: stringOptional
tags?: { Optional
timestamp?: numberUpdates the current transaction with a new TransactionContext
Generated using TypeDoc
An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities. You can have multiple IdleTransactions active, but if the
onScope
option is specified, the idle transaction will put itself on the scope on creation.