feat: add rpc_method_name, type and retry_reason to degraded RPC endpoint Segment events#40176
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
@metamaskbot update-policies |
|
Policy update failed. You can review the logs or retry the policy update here |
dcd28d1 to
401bcb5
Compare
|
@metamaskbot update-policies |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Policy update failed. You can review the logs or retry the policy update here |
|
@metamaskbot update-policies |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff 👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes |
✨ Files requiring CODEOWNER review ✨📜 @MetaMask/policy-reviewers (8 files, +364 -16)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. |
Builds ready [617720a]
UI Startup Metrics (1399 ± 90 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
rpcMethodName to degraded and unavailable RPC endpoint Segment eventsrpcMethodName to degraded RPC endpoint Segment events
Builds ready [106ae41]
UI Startup Metrics (1414 ± 103 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚀 Bundle size reduced!]
|
106ae41 to
4bacbe1
Compare
|
@metamaskbot update-policies |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff 👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes |
f731eef to
5b27352
Compare
app/scripts/lib/network-controller/messenger-action-handlers.ts
Outdated
Show resolved
Hide resolved
4067c57 to
1861770
Compare
| languageName: node | ||
| linkType: hard | ||
|
|
||
| "@metamask/network-controller@npm:^30.0.0": |
There was a problem hiding this comment.
There are now three different versions of network-controller in the dependency tree. We may want to encourage other teams to upgrade their packages. But that can happen outside of this PR.
rpc_method_name, degraded_event_type and retry_reason to degraded RPC endpoint Segment eventsrpc_method_name, type and retry_reason to degraded RPC endpoint Segment events
Mrtenz
left a comment
There was a problem hiding this comment.
Policy changes look fine to me. Just introducing a new version of network-controller since some packages still use the previous major.
Builds ready [1861770]
UI Startup Metrics (1429 ± 106 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Add
rpc_method_name,typeandretry_reasonto theRPC Service DegradedSegment events. This lets us identify which JSON-RPC methods produce the most slow requests or retry exhaustions, enabling better debugging of RPC endpoint health issues.Consumes the new
rpcMethodName,typeandretryReasonfield added toNetworkController:rpcEndpointDegradedevents in@metamask/network-controller(core PR #7954, #7988).Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/WPC-441
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Primarily telemetry/schema changes, but the
@metamask/network-controllermajor-version bump plus LavaMoat policy updates could affect runtime behavior or bundling if any dependency allowances are incorrect.Overview
NetworkController:rpcEndpointDegradedhandling is updated to consume new event fields and emit richerRPC Service DegradedSegment properties:rpc_method_name, degradationtype(e.g. slow success vs retries exhausted), and optionalretry_reason.This bumps
@metamask/network-controllerto^30.0.0(with related lockfile updates) and updates LavaMoat policies to reflect the new dependency graph/package nesting; tests are adjusted to assert the new telemetry properties.Written by Cursor Bugbot for commit 1861770. This will update automatically on new commits. Configure here.