Skip to main content

Type Definitions

ReportError

Represents a report error object. The object has the following keys:

  interface ReportError {
// The error name
name: string
//The error message
message: string
// The error stacktrace as individual frames
stacktrace: Stacktrace
}

See: Stacktrace

Report

Represents a report event.

  interface Report {
// An array of Breadcrumb objects
breadcrumbs: Breadcrumb[] = []
// An error object. The error will be defined when using `Sentry.captureException`
error?: ReportError
// The message key will be defined when using `Sentry.captureMessage`.
message?: string
// The extra context provided by `scope.setExtra`.
extra?: { [key: string]: any }
// The level of the report provided by `scope.setLevel`.
level: SeverityLevel = SeverityLevel.Error
// The release string provided by `scope.setRelease`.
release?: string
// The user provided by `scope.setUser`.
user?: User
// The tags provided by `scope.setTag`.
tags: { [key: string]: string } = {}
// Sentry's original report object.
originalReport: Event
}

The tags provided by scope.setTag. See: Breadcrumb ReportError Severity User SentryEvent

Transaction

Represents a transaction event.

  interface Transaction {
// The `name` field of the transaction.
name: string
// The id of the trace the transaction is associated with.
traceId: string
// The release string provided by `scope.setRelease`.
release?: string
// The extra context provided by `scope.setExtra`.
extra?: Record<string, unknown>
// The tags provided by `scope.setTag`.
tags: Record<string, unknown> = {}
// An array of child `Span` objects for this transaction
spans: Span[] = []
}

Span

Represents a child span event of a specific transaction.

  interface Span {
// The `id` field of the reported span.
id: string
// The `op` field of the reported span.
op?: string = 'default'
// The `description` field of the reported span.
description?: string
// The id of the parent transaction.
parentSpanId: string
}