telemetry
Classes
NoopTelemetry
Defined in: core/telemetry.ts:37
Implements
Constructors
Constructor
new NoopTelemetry(): NoopTelemetry;
Returns
Methods
event()
event(): void;
Defined in: core/telemetry.ts:38
Fire-and-forget event. Implementations must not throw.
Returns
void
Implementation of
span()
span<T>(_name, fn): Promise<...>;
Defined in: core/telemetry.ts:39
Wrap an async operation; implementations decide what to time/log.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
_name | string |
fn | () => ... |
Returns
Promise<...>
Implementation of
error()
error(): void;
Defined in: core/telemetry.ts:42
Report an error. Implementations must not re-throw.
Returns
void
Implementation of
scope()
scope(_tags): SdkTelemetry;
Defined in: core/telemetry.ts:48
No-op telemetry has no state to carry — returning this is correct and
avoids a per-request allocation. Consumers that swap to a real adapter
will get a fresh child instance per call.
Parameters
| Parameter | Type |
|---|---|
_tags | SdkTelemetryTags |
Returns
Implementation of
ConsoleTelemetry
Defined in: telemetry/console.ts:9
Console-backed SdkTelemetry adapter. Prefixes every line with [tokenops-sdk]
and emits start / end markers around every span. Pair with ConsoleTelemetry.scope
to attach per-request correlation tags — the child instance prepends the tags
to every event / span / error line.
Implements
Constructors
Constructor
new ConsoleTelemetry(tags?): ConsoleTelemetry;
Defined in: telemetry/console.ts:13
Parameters
| Parameter | Type |
|---|---|
tags? | ... | ... |
Returns
Methods
event()
event(name, props?): void;
Defined in: telemetry/console.ts:25
Fire-and-forget event. Implementations must not throw.
Parameters
| Parameter | Type |
|---|---|
name | string |
props? | ... | ... |
Returns
void
Implementation of
span()
span<T>(name, fn): Promise<...>;
Defined in: telemetry/console.ts:31
Wrap an async operation; implementations decide what to time/log.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
name | string |
fn | () => ... |
Returns
Promise<...>
Implementation of
error()
error(err, context?): void;
Defined in: telemetry/console.ts:47
Report an error. Implementations must not re-throw.
Parameters
| Parameter | Type |
|---|---|
err | Error |
context? | ... | ... |
Returns
void
Implementation of
scope()
scope(tags): ConsoleTelemetry;
Defined in: telemetry/console.ts:66
Return a child ConsoleTelemetry bound to the merged tags. Per-request
correlation pattern:
const requestTelemetry = telemetry.scope({ requestId, userId });
const factory = createConfidentialVestingFactoryClient({
publicClient, walletClient, telemetry: requestTelemetry,
});
Tags from the parent are preserved; collisions on the same key resolve to the child's value (last-write-wins, pino-compatible behaviour).
Parameters
| Parameter | Type |
|---|---|
tags | SdkTelemetryTags |
Returns
Implementation of
TokenOpsTelemetry
Defined in: telemetry/tokenops.ts:10
Implements
Constructors
Constructor
new TokenOpsTelemetry(opts): TokenOpsTelemetry;
Defined in: telemetry/tokenops.ts:11
Parameters
| Parameter | Type |
|---|---|
opts | TokenOpsTelemetryOptions |
Returns
Methods
event()
event(name, props?): void;
Defined in: telemetry/tokenops.ts:13
Fire-and-forget event. Implementations must not throw.
Parameters
| Parameter | Type |
|---|---|
name | string |
props? | ... | ... |
Returns
void
Implementation of
span()
span<T>(name, fn): Promise<...>;
Defined in: telemetry/tokenops.ts:17
Wrap an async operation; implementations decide what to time/log.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
name | string |
fn | () => ... |
Returns
Promise<...>
Implementation of
error()
error(err, context?): void;
Defined in: telemetry/tokenops.ts:29
Report an error. Implementations must not re-throw.
Parameters
| Parameter | Type |
|---|---|
err | Error |
context? | ... | ... |
Returns
void
Implementation of
Interfaces
TokenOpsTelemetryOptions
Defined in: telemetry/tokenops.ts:3
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
endpoint | string | - | telemetry/tokenops.ts:4 |
sdkVersion | string | - | telemetry/tokenops.ts:5 |
installationId? | ... | ... | Optional anonymous installation id (caller-managed, persistent across runs). | telemetry/tokenops.ts:7 |
Functions
withTelemetry()
function withTelemetry<T>(
telemetry,
name,
fn): Promise<...>;
Defined in: core/telemetry.ts:54
Helper used inside SDK clients: span + error forwarding.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
telemetry | ... | ... |
name | string |
fn | () => ... |
Returns
Promise<...>