Skip to content
RELKIT
Esc
↑↓navigate↵open⌘Jpreview
On this page

Sentry API

Generated public TypeScript reference for @relkit/sentry.

For configuration and examples, read observability.

Public imports

  • @relkit/sentry — 3 exports
  • @relkit/sentry/runtime — 7 exports

All exported APIs

Names link to their complete contracts. Re-exports share their original contract; legacy exports keep their separate identity. Examples link to the API’s inline sample, a maintained repository usage, or the shared module walkthrough.

API Kind Import from Example
createSentryExporter Value @relkit/sentry/runtime Module example
createTelemetryExporter Value @relkit/sentry/runtime Module example
runtimeIntegration Value @relkit/sentry/runtime Module example
sentry Value @relkit/sentry Source example
SentryExporter Type @relkit/sentry/runtime Module example
SentryExporterOptions Type @relkit/sentry/runtime Module example
SentryOptions Type @relkit/sentry Module example
SentryScope Type @relkit/sentry/runtime Module example
SentrySdk Type @relkit/sentry/runtime Module example
SentryTelemetryExporter Type @relkit/sentry Module example

index.ts

“./sentry.js” (namespace export)

Re-exports all named exports from the “./sentry.js” module.

Signature

export * from "./sentry.js";

Source

exporter.ts

SentryExporter (interface)

Signature

export interface SentryExporter {
  readonly exportRecord: (record: RedactedObservabilityRecord) => void;
  readonly flush: (timeoutMs?: number) => Promise<boolean>;
  readonly close: (timeoutMs?: number) => Promise<boolean>;
}

Source

SentryExporterOptions (interface)

Signature

export interface SentryExporterOptions {
  readonly dsn: string;
  readonly environment?: string;
  readonly release?: string;
  readonly sdk?: SentrySdk;
}

Source

SentryScope (interface)

Signature

export interface SentryScope {
  readonly setTag: (name: string, value: string) => void;
}

Source

SentrySdk (interface)

Signature

export interface SentrySdk {
  readonly init: (options: Readonly<Record<string, unknown>>) => void;
  readonly withScope: (callback: (scope: SentryScope) => void) => void;
  readonly captureException: (error: Error) => unknown;
  readonly captureEvent: (event: Readonly<Record<string, unknown>>) => unknown;
  readonly flush: (timeout?: number) => Promise<boolean>;
  readonly close: (timeout?: number) => Promise<boolean>;
}

Source

createSentryExporter

Signature

declare const createSentryExporter: (options: SentryExporterOptions) => Promise<SentryExporter>;

Source

createTelemetryExporter

Signature

declare const createTelemetryExporter: (
  context: TelemetryExporterFactoryContext,
) => Promise<TelemetryExporterRuntime>;

Source

index.ts

“./exporter.js” (namespace export)

Re-exports all named exports from the “./exporter.js” module.

Signature

export * from "./exporter.js";

Source

runtimeIntegration

Signature

declare const runtimeIntegration: Readonly<{
  kind: "runtime-integration";
  integrationId: "sentry";
  registrations: ReadonlyArray<{ capability: string; adapterId: string; protocolVersion: number }>;
}>;

Source

sentry.ts

SentryOptions (interface)

Signature

export interface SentryOptions {
  readonly dsn: TextInput;
  readonly environment?: TextInput;
  readonly release?: TextInput;
}

Source

SentryTelemetryExporter (type alias)

Signature

type SentryTelemetryExporter = TelemetryExporterDescriptor<"sentry", "sentry", SentryOptions>;

Source

sentry

Declares one statically loaded Sentry telemetry exporter.

Signature

declare const sentry: (options: SentryOptions) => SentryTelemetryExporter;

Source