fix(realtime): propagate observability telemetry options#133
Merged
VerioN1 merged 1 commit intoMay 13, 2026
Merged
Conversation
VerioN1
approved these changes
May 13, 2026
VerioN1
pushed a commit
that referenced
this pull request
May 14, 2026
- Propagate the SDK `telemetryEnabled` option through the realtime subscribe path instead of forcing telemetry off. - Require injected `RealtimeObservability` in `WebRTCManager` / `WebRTCConnection`, removing the hard-coded disabled observability fallback with an empty API key. - Rename inter-frame delay `Variance` stat to `StdDev` to match the actual computation. - `pnpm --filter @decartai/sdk typecheck` - `pnpm --filter @decartai/sdk format:check` (passes with existing warnings/info) - `pnpm --filter @decartai/sdk test -- --run` - `pnpm --filter @decartai/sdk build` (passes; existing tsdown warning about `define` option) - Independent Claude Code review of diff vs `origin/alon/livekit-pr1-observability` Base for #132. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes realtime telemetry behavior (subscribe path now honors `telemetryEnabled`) and makes `WebRTCManager`/`WebRTCConnection` require an injected `RealtimeObservability`, which can be a breaking change for any consumers constructing these classes directly. Renaming a `WebRTCStats` field also risks downstream type/runtime expectations. > > **Overview** > Realtime subscribe sessions now honor the SDK’s `telemetryEnabled` option and immediately call `observability.sessionStarted(sid)` so telemetry/diagnostics are associated with the session. > > `WebRTCManager` and `WebRTCConnection` no longer create an internal fallback `RealtimeObservability` (previously hard-coded telemetry off with an empty API key); callers must pass `observability` explicitly, and unit tests are updated accordingly. > > In `WebRTCStats`, the inter-frame delay metric is renamed from `interFrameDelayVarianceMs` to `interFrameDelayStdDevMs` to match the actual std-dev calculation. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 16388f0. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
telemetryEnabledoption through the realtime subscribe path instead of forcing telemetry off.RealtimeObservabilityinWebRTCManager/WebRTCConnection, removing the hard-coded disabled observability fallback with an empty API key.Variancestat toStdDevto match the actual computation.Checks
pnpm --filter @decartai/sdk typecheckpnpm --filter @decartai/sdk format:check(passes with existing warnings/info)pnpm --filter @decartai/sdk test -- --runpnpm --filter @decartai/sdk build(passes; existing tsdown warning aboutdefineoption)origin/alon/livekit-pr1-observabilityBase for #132.
Note
Medium Risk
Changes realtime telemetry behavior (subscribe path now honors
telemetryEnabled) and makesWebRTCManager/WebRTCConnectionrequire an injectedRealtimeObservability, which can be a breaking change for any consumers constructing these classes directly. Renaming aWebRTCStatsfield also risks downstream type/runtime expectations.Overview
Realtime subscribe sessions now honor the SDK’s
telemetryEnabledoption and immediately callobservability.sessionStarted(sid)so telemetry/diagnostics are associated with the session.WebRTCManagerandWebRTCConnectionno longer create an internal fallbackRealtimeObservability(previously hard-coded telemetry off with an empty API key); callers must passobservabilityexplicitly, and unit tests are updated accordingly.In
WebRTCStats, the inter-frame delay metric is renamed frominterFrameDelayVarianceMstointerFrameDelayStdDevMsto match the actual std-dev calculation.Reviewed by Cursor Bugbot for commit 16388f0. Bugbot is set up for automated code reviews on this repo. Configure here.