Skip to main content
Module

x/sentry/index.d.ts>Transaction

The Official Sentry Deno SDK
Go to Latest
interface Transaction
implements TransactionContext, Omit<Span$1, "setName" | "name">
import { type Transaction } from "https://deno.land/x/sentry@7.77.0/index.d.ts";

Transaction "Class", inherits Span only has setName

Properties

spanId: string
traceId: string
startTimestamp: number
tags: { [key: string]: Primitive; }
data: { [key: string]: any; }
metadata: TransactionMetadata

Metadata about the transaction

instrumenter: Instrumenter

The instrumenter that created this transaction.

Methods

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

Set the name of the transaction

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

Set the context of a transaction event

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

Set observed measurement for this transaction.

toContext(): TransactionContext

Returns the current transaction properties as a TransactionContext

updateWithContext(transactionContext: TransactionContext): this

Updates the current transaction with a new TransactionContext

setMetadata(newMetadata: Partial<TransactionMetadata>): void

Set metadata for this transaction.

getDynamicSamplingContext(): Partial<DynamicSamplingContext>

Return the current Dynamic Sampling Context of this transaction