Skip to content

chore(repo): align sfu events naming with other SDKs#1279

Merged
Brazol merged 4 commits into
mainfrom
fix/align-sfu-event-naming
Jul 10, 2026
Merged

chore(repo): align sfu events naming with other SDKs#1279
Brazol merged 4 commits into
mainfrom
fix/align-sfu-event-naming

Conversation

@Brazol

@Brazol Brazol commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added structured serialization for inbound video state notifications.
    • Centralized call, SFU, device, and WebRTC telemetry identifiers for more consistent diagnostics.
  • Improvements

    • Standardized tracing across call lifecycle, reconnection, media, and signaling events without changing call behavior.

@Brazol Brazol requested a review from a team as a code owner July 10, 2026 09:10
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Brazol, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1213f5fb-d7ad-4c2a-a3be-9eae47a4c7c4

📥 Commits

Reviewing files that changed from the base of the PR and between e0731d7 and f575d4c.

📒 Files selected for processing (6)
  • packages/stream_video/lib/src/call/call.dart
  • packages/stream_video/lib/src/call/session/call_session.dart
  • packages/stream_video/lib/src/call/stats/sfu_stats_reporter.dart
  • packages/stream_video/lib/src/call/stats/trace_tag.dart
  • packages/stream_video/lib/src/webrtc/rtc_media_device/rtc_media_device_notifier.dart
  • packages/stream_video/lib/src/webrtc/traced_peer_connection.dart
📝 Walkthrough

Walkthrough

The change centralizes tracing identifiers in TraceTag, replaces hardcoded trace strings across call, SFU, and WebRTC code, and adds JSON serialization for inbound video state events.

Changes

Trace tag migration and SFU event serialization

Layer / File(s) Summary
Centralized trace tag contract
packages/stream_video/lib/src/call/stats/trace_tag.dart
Defines shared constants for call, SFU, WebRTC, device, and media trace identifiers.
Call lifecycle instrumentation
packages/stream_video/lib/src/call/call.dart, packages/stream_video/lib/src/call/session/call_session.dart, packages/stream_video/lib/src/call/stats/sfu_stats_reporter.dart
Replaces lifecycle and device-statistics trace strings with TraceTag constants while preserving payloads and control flow.
SFU tracing and event serialization
packages/stream_video/lib/src/sfu/sfu_client.dart, packages/stream_video/lib/src/sfu/sfu_extensions.dart
Uses centralized tags for SFU RPC traces and adds JSON mappings for inbound video state notifications and states.
WebRTC and media instrumentation
packages/stream_video/lib/src/webrtc/...
Replaces peer connection, media, device notifier, and factory trace strings with TraceTag constants.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: xsahil03x, renefloor

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No description was provided, so none of the required Goal, Implementation details, or Testing sections are filled in. Add the PR template sections with a goal, implementation details, testing/validation notes, and any relevant screenshots or checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is related to the change, but it only mentions SFU event naming while the diff also centralizes tracing tags across call and WebRTC code.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/align-sfu-event-naming

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 12.35955% with 78 lines in your changes missing coverage. Please review.
✅ Project coverage is 11.07%. Comparing base (27c3c0e) to head (f575d4c).

Files with missing lines Patch % Lines
...m_video/lib/src/webrtc/traced_peer_connection.dart 0.00% 26 Missing ⚠️
packages/stream_video/lib/src/sfu/sfu_client.dart 6.25% 15 Missing ⚠️
...tream_video/lib/src/call/session/call_session.dart 17.64% 14 Missing ⚠️
...kages/stream_video/lib/src/sfu/sfu_extensions.dart 0.00% 11 Missing ⚠️
packages/stream_video/lib/src/call/call.dart 50.00% 7 Missing ⚠️
...tc/rtc_media_device/rtc_media_device_notifier.dart 0.00% 3 Missing ⚠️
...m_video/lib/src/call/stats/sfu_stats_reporter.dart 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1279      +/-   ##
==========================================
- Coverage   11.17%   11.07%   -0.11%     
==========================================
  Files         686      686              
  Lines       50320    50337      +17     
==========================================
- Hits         5625     5576      -49     
- Misses      44695    44761      +66     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/stream_video/lib/src/call/stats/trace_tag.dart (1)

76-91: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Inconsistent failure suffix: .failure vs .error

The SFU RPCs and createOffer/createAnswer use .failure for their error tags, while setRemoteDescription, setLocalDescription, and addIceCandidate use .error. Since this PR's stated goal is aligning naming conventions, consider standardizing on one suffix.

♻️ Suggested alignment to `.failure`
-  static const String setRemoteDescriptionError = 'setRemoteDescription.error';
+  static const String setRemoteDescriptionFailure = 'setRemoteDescription.failure';
-  static const String setLocalDescriptionError = 'setLocalDescription.error';
+  static const String setLocalDescriptionFailure = 'setLocalDescription.failure';
-  static const String addIceCandidateError = 'addIceCandidate.error';
+  static const String addIceCandidateFailure = 'addIceCandidate.failure';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/stream_video/lib/src/call/stats/trace_tag.dart` around lines 76 -
91, Standardize the error tag suffixes in the trace-tag constants by renaming
setRemoteDescriptionError, setLocalDescriptionError, and addIceCandidateError to
use `.failure`, matching the existing SFU RPC and createOffer/createAnswer
conventions; update all references to these symbols accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@packages/stream_video/lib/src/call/stats/trace_tag.dart`:
- Around line 76-91: Standardize the error tag suffixes in the trace-tag
constants by renaming setRemoteDescriptionError, setLocalDescriptionError, and
addIceCandidateError to use `.failure`, matching the existing SFU RPC and
createOffer/createAnswer conventions; update all references to these symbols
accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a7c2c0e4-61cb-425f-8019-003af90f2e7a

📥 Commits

Reviewing files that changed from the base of the PR and between 390604f and e0731d7.

📒 Files selected for processing (10)
  • packages/stream_video/lib/src/call/call.dart
  • packages/stream_video/lib/src/call/session/call_session.dart
  • packages/stream_video/lib/src/call/stats/sfu_stats_reporter.dart
  • packages/stream_video/lib/src/call/stats/trace_tag.dart
  • packages/stream_video/lib/src/sfu/sfu_client.dart
  • packages/stream_video/lib/src/sfu/sfu_extensions.dart
  • packages/stream_video/lib/src/webrtc/media/media_constraints.dart
  • packages/stream_video/lib/src/webrtc/peer_connection_factory.dart
  • packages/stream_video/lib/src/webrtc/rtc_media_device/rtc_media_device_notifier.dart
  • packages/stream_video/lib/src/webrtc/traced_peer_connection.dart

Brazol added 2 commits July 10, 2026 14:13
# Conflicts:
#	packages/stream_video/lib/src/call/session/call_session.dart
@Brazol Brazol merged commit 57bb7da into main Jul 10, 2026
17 of 18 checks passed
@Brazol Brazol deleted the fix/align-sfu-event-naming branch July 10, 2026 12:38
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