Skip to content

Function: createCore()

Prefactor TypeScript SDK


Prefactor TypeScript SDK / @prefactor/core / createCore

createCore(config, options?): CoreRuntime

Defined in: packages/core/src/create-core.ts:33

Creates a fully initialized core runtime from validated SDK configuration.

Resolved SDK configuration.

"http" = ...

Transport type to use for span emission

number = ...

Sampling rate (0.0 to 1.0)

boolean = ...

Whether to capture span inputs

boolean = ...

Whether to capture span outputs

number = ...

Maximum length for input strings

number = ...

Maximum length for output strings

{ apiUrl: string; apiToken: string; agentId?: string; agentIdentifier?: string; agentName?: string; agentDescription?: string; agentSchema?: Record<string, unknown>; requestTimeout?: number; maxRetries?: number; initialRetryDelay?: number; maxRetryDelay?: number; retryMultiplier?: number; retryOnStatusCodes?: number[]; } = ...

HTTP transport configuration (required if transportType is ‘http’)

string = ...

string = ...

string = ...

string = ...

string = ...

string = ...

Record<string, unknown> = ...

number = ...

number = ...

number = ...

number = ...

number = ...

number[] = ...

{ onFatalError?: (error) => void; } = ...

Optional failure handling callbacks.

(error) => void = ...

CreateCoreOptions = {}

Optional runtime construction options.

CoreRuntime

Runtime containing tracer, agent manager, and shutdown function.