Class: HttpTransport
Prefactor TypeScript SDK / @prefactor/core / HttpTransport
Class: HttpTransport
Section titled “Class: HttpTransport”Defined in: packages/core/src/transport/http.ts:105
HTTP-backed transport that serializes span operations through an internal queue.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HttpTransport(
config,options?):HttpTransport
Defined in: packages/core/src/transport/http.ts:133
Parameters
Section titled “Parameters”config
Section titled “config”apiUrl
Section titled “apiUrl”string = ...
API endpoint URL
apiToken
Section titled “apiToken”string = ...
Authentication token
agentIdentifier
Section titled “agentIdentifier”string = ...
Agent identifier (external identifier); defaults to v1.0.0 when omitted
requestTimeout
Section titled “requestTimeout”number = ...
Request timeout in milliseconds
maxRetries
Section titled “maxRetries”number = ...
Maximum number of retry attempts
initialRetryDelay
Section titled “initialRetryDelay”number = ...
Initial delay between retries in milliseconds
maxRetryDelay
Section titled “maxRetryDelay”number = ...
Maximum delay between retries in milliseconds
retryMultiplier
Section titled “retryMultiplier”number = ...
Multiplier for exponential backoff
retryOnStatusCodes
Section titled “retryOnStatusCodes”number[] = ...
Status codes that should trigger retries
agentId?
Section titled “agentId?”string = ...
Optional agent instance identifier (internal ID)
agentName?
Section titled “agentName?”string = ...
Optional agent name
agentDescription?
Section titled “agentDescription?”string = ...
Optional agent description
agentSchema?
Section titled “agentSchema?”Record<string, unknown> = ...
Optional agent schema for validation (full schema object)
options?
Section titled “options?”HttpTransportOptions
Returns
Section titled “Returns”HttpTransport
Methods
Section titled “Methods”registerSchema()
Section titled “registerSchema()”registerSchema(
schema):void
Defined in: packages/core/src/transport/http.ts:155
Parameters
Section titled “Parameters”schema
Section titled “schema”Record<string, unknown>
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”startAgentInstance()
Section titled “startAgentInstance()”startAgentInstance(
options?):void
Defined in: packages/core/src/transport/http.ts:175
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”finishAgentInstance()
Section titled “finishAgentInstance()”finishAgentInstance():
void
Defined in: packages/core/src/transport/http.ts:188
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”emit()
Section titled “emit()”emit(
span):void
Defined in: packages/core/src/transport/http.ts:197
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”finishSpan()
Section titled “finishSpan()”finishSpan(
spanId,endTime,options?):void
Defined in: packages/core/src/transport/http.ts:207
Parameters
Section titled “Parameters”spanId
Section titled “spanId”string
endTime
Section titled “endTime”number
options?
Section titled “options?”FinishSpanOptions
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”assertUsable()
Section titled “assertUsable()”assertUsable(
operation):void
Defined in: packages/core/src/transport/http.ts:220
Parameters
Section titled “Parameters”operation
Section titled “operation”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”getHealthState()
Section titled “getHealthState()”getHealthState():
PrefactorTransportHealthState
Defined in: packages/core/src/transport/http.ts:231
Returns
Section titled “Returns”Implementation of
Section titled “Implementation of”close()
Section titled “close()”close():
Promise<void>
Defined in: packages/core/src/transport/http.ts:235
Returns
Section titled “Returns”Promise<void>