Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/sentry/index.mjs>Transaction

The Official Sentry Deno SDK
Latest
interface Transaction
implements TransactionContext, Omit<Span, "setName" | "name">
import { type Transaction } from "https://deno.land/x/sentry@7.120.0/index.mjs";

Transaction "Class", inherits Span only has setName

Properties

deprecated
name: string

Human-readable identifier for the transaction.

deprecated
spanId: string

The ID of the transaction.

deprecated
traceId: string

The ID of the trace.

optional
deprecated
sampled: boolean | undefined

Was this transaction chosen to be sent as part of the sample?

startTimestamp: number
deprecated
tags: { [key: string]: Primitive; }

Tags for the transaction.

deprecated
data: { [key: string]: any; }

Data for the transaction.

deprecated
attributes: SpanAttributes

Attributes for the transaction.

deprecated
metadata: TransactionMetadata

Metadata about the transaction.

deprecated
instrumenter: Instrumenter

The instrumenter that created this transaction.

Methods

deprecated
setName(name: string, source?: TransactionMetadata["source"]): void

Set the name of the transaction

deprecated
setContext(key: string, context: Context): void

Set the context of a transaction event.

deprecated
setMeasurement(
name: string,
value: number,
unit: MeasurementUnit,
): void

Set observed measurement for this transaction.

deprecated
toContext(): TransactionContext

Returns the current transaction properties as a TransactionContext.

deprecated
updateWithContext(transactionContext: TransactionContext): this

Updates the current transaction with a new TransactionContext.

deprecated
setMetadata(newMetadata: Partial<TransactionMetadata>): void

Set metadata for this transaction.

deprecated
getDynamicSamplingContext(): Partial<DynamicSamplingContext>

Return the current Dynamic Sampling Context of this transaction

deprecated
getProfileId(): string | undefined

Get the profile id from the transaction