Skip to content

fix: Metrics for locally invoked RPCs (back-port) - #4270

Open
paolo-abela wants to merge 1 commit into
develop-2.0.0from
fix/locally-invoked-rpc-metrics-port-2.0.0
Open

paolo-abela wants to merge 1 commit into
develop-2.0.0from
fix/locally-invoked-rpc-metrics-port-2.0.0

Conversation

@paolo-abela

@paolo-abela paolo-abela commented Dec 3, 2026 •

Copy link
Copy Markdown

Purpose of this PR

Locally invoked RPC messages had incorrect metrics. This PR fixes that.

Port of PR-141038

Jira ticket

UUM-163005

Changelog

Fixed: TrackRpcReceivedMetricOnServer and TrackRpcReceivedMetricOnClient tests in the tools package

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Up-port

#4267

Backports

None

@paolo-abela
paolo-abela requested a review from a team as a code owner December 3, 2026 16:11
@cla-assistant-unity

cla-assistant-unity Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@paolo-abela paolo-abela changed the title [Backport] fix: Metrics for locally invoked RPCs fix: Metrics for locally invoked RPCs (back-port) Dec 3, 2026

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Harness Review

Ship it

The change aligns RPC receive byte counts with serialized message sizes while retaining the payload-size fallback for local calls. I examined send-side accounting and context handling for direct, local, deferred, and proxied RPCs and found no actionable issues.

Reviewed commit 083b685

🤖 Helpful? 👍/👎

@codecov-github-com

codecov-github-com Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

@@                Coverage Diff                @@
##           develop-2.0.0    #4270      +/-   ##
=================================================
+ Coverage          74.77%   74.78%   +0.01%     
=================================================
  Files                172      172              
  Lines              28400    28400              
=================================================
+ Hits               21236    21239       +3     
+ Misses              7164     7161       -3     
Flag Coverage Δ
NGOv2_project_testproject_ubuntu 74.37% <100.00%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...eobjects/Runtime/Messaging/Messages/RpcMessages.cs 42.61% <100.00%> (ø)

... and 3 files with indirect coverage changes

Components Coverage Δ
com.unity.netcode.gameobjects 74.78% <100.00%> (+0.01%) ⬆️

ℹ️ Need help interpreting these results?

This branch has not been deployed

No deployments
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.

1 participant