Interface: GovernanceObserver
Defined in: packages/core/src/introspection/GovernanceObserver.ts:56
A governance observer that emits debug events and tracing spans.
All methods accept a callback that performs the actual work. The observer wraps the callback with timing and event emission.
Methods
observe()
ts
observe<T>(
operation,
label,
fn): T;Defined in: packages/core/src/introspection/GovernanceObserver.ts:65
Wrap a governance operation with observability.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
operation | GovernanceOperation | Named governance operation |
label | string | Human-readable label |
fn | () => T | The actual work to perform |
Returns
T
The result of fn
observeAsync()
ts
observeAsync<T>(
operation,
label,
fn): Promise<T>;Defined in: packages/core/src/introspection/GovernanceObserver.ts:79
Wrap an async governance operation with observability.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
operation | GovernanceOperation | Named governance operation |
label | string | Human-readable label |
fn | () => Promise<T> | The actual async work to perform |
Returns
Promise<T>
The result of fn