You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(telemetry): address review highs — refcount leak, FIFO fallthrough, public types, README, test gaps
- DBSQLClient.initializeTelemetry: release the per-host refcount on the
catch path so a throw between getOrCreateClient and the success log
doesn't leak a TelemetryClient (with its flush timer / exporter / FFCache)
for the lifetime of the process on long-running supervisors.
- TelemetryClient.getClient/getDriver: walk the FIFO with try/catch
fallthrough to mirror getConnectionProvider, so a closed-but-not-yet-
released head context doesn't take the whole shared pool down.
getAuthProvider: return the first defined entry from the FIFO.
- lib/index.ts: re-export TelemetryEventType, DEFAULT_TELEMETRY_CONFIG,
and the consumer-facing telemetry payload types so SDK users don't
need to deep-import for type-checked event/metric handling.
- README: add a Telemetry section covering what's collected, the three
opt-out paths (env var, programmatic, server-side feature flag), the
tunable knobs, and the await-close requirement for short-lived
processes.
- MetricsAggregator.test.ts: cover chunk-timing aggregation
(initial=first-positive, slowest=max, sum=running) and CONNECTION_CLOSE
→ DELETE_SESSION emission. Both were acknowledged coverage gaps.
- TelemetryEventEmitter.test.ts: cover emitConnectionClose — emission
shape, disabled-flag suppression, and listener-exception swallow.
Co-authored-by: Isaac
0 commit comments