Skip to content

fix(realtime): propagate observability telemetry options#133

Merged
VerioN1 merged 1 commit into
alon/livekit-pr1-observabilityfrom
rene/livekit-pr1-observability-fixes
May 13, 2026
Merged

fix(realtime): propagate observability telemetry options#133
VerioN1 merged 1 commit into
alon/livekit-pr1-observabilityfrom
rene/livekit-pr1-observability-fixes

Conversation

@AdirAmsalem
Copy link
Copy Markdown
Contributor

@AdirAmsalem AdirAmsalem commented May 13, 2026

Summary

  • 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.

Checks

  • 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.


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.

Reviewed by Cursor Bugbot for commit 16388f0. Bugbot is set up for automated code reviews on this repo. Configure here.

@AdirAmsalem AdirAmsalem requested a review from VerioN1 May 13, 2026 07:06
@VerioN1 VerioN1 merged commit 88f9a0f into alon/livekit-pr1-observability May 13, 2026
1 check passed
@VerioN1 VerioN1 deleted the rene/livekit-pr1-observability-fixes branch May 13, 2026 07:26
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 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants