An OpenTelemetry Tracer instance obtained from
trace.getTracer('bridge-sdk', '0.1.0').
Optional configuration.
An ObservabilityHooks object ready to pass to BridgeConfig.hooks.
import { trace } from '@opentelemetry/api';
import { OnboardingBridgeSDK, createOpenTelemetryHooks } from '...';
const tracer = trace.getTracer('my-service', '1.0.0');
const sdk = new OnboardingBridgeSDK({
contractId: 'CA...',
rpcUrl: 'https://soroban-testnet.stellar.org',
networkPassphrase: Networks.TESTNET,
hooks: createOpenTelemetryHooks(tracer),
});
Create an ObservabilityHooks implementation backed by an OpenTelemetry
Tracer.Each mutating SDK method becomes a span with:
bridge.method— the SDK method name.bridge.tx.hash— the transaction hash on success.bridge.tx.status—'pending','success', or'failed'.bridge.duration_ms— wall-clock duration.RPC calls (when
traceRpcCallsis true, the default) produce spans with:rpc.method— the RPC method label.rpc.duration_ms— round-trip duration.