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";
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>;
}
SentryExporterOptions (interface)
Signature
export interface SentryExporterOptions {
readonly dsn: string;
readonly environment?: string;
readonly release?: string;
readonly sdk?: SentrySdk;
}
SentryScope (interface)
Signature
export interface SentryScope {
readonly setTag: (name: string, value: string) => void;
}
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>;
}
createSentryExporter
Signature
declare const createSentryExporter: (options: SentryExporterOptions) => Promise<SentryExporter>;
createTelemetryExporter
Signature
declare const createTelemetryExporter: (
context: TelemetryExporterFactoryContext,
) => Promise<TelemetryExporterRuntime>;
index.ts
“./exporter.js” (namespace export)
Re-exports all named exports from the “./exporter.js” module.
Signature
export * from "./exporter.js";
runtimeIntegration
Signature
declare const runtimeIntegration: Readonly<{
kind: "runtime-integration";
integrationId: "sentry";
registrations: ReadonlyArray<{ capability: string; adapterId: string; protocolVersion: number }>;
}>;
sentry.ts
SentryOptions (interface)
Signature
export interface SentryOptions {
readonly dsn: TextInput;
readonly environment?: TextInput;
readonly release?: TextInput;
}
SentryTelemetryExporter (type alias)
Signature
type SentryTelemetryExporter = TelemetryExporterDescriptor<"sentry", "sentry", SentryOptions>;
sentry
Declares one statically loaded Sentry telemetry exporter.
Signature
declare const sentry: (options: SentryOptions) => SentryTelemetryExporter;