[telemetry] add external route related telemetry
This commit added new entry ExternalRoutes inside message wpan_border_router to indicate the information about the external route added in leader network data
The ExternalRoutes has three bool fields:
-
has_default_route_added: if leader network data hasroute ::/0 -
has_ula_route_added: if leader network data has routefc00::/7 -
has_others_route_added: if leader network has others route
These information are collectly only when both TELEMETRY_DATA_API and BORDER_ROUTING are enabled.
This commit also enhanced the class otbr::Ip6Address and class otbr::Ip6Prefix by adding some more constructors, so that the ipv6 address/prefix can be easily constructed by a string. The operator== of Ip6Prefix is also added to compare the prefix length and first N-bit of the prefix, where N is length of the prefix.
Codecov Report
Attention: Patch coverage is 54.05405% with 34 lines in your changes are missing coverage. Please review.
Project coverage is 39.88%. Comparing base (
2b41187) to head (396930b). Report is 671 commits behind head on main.
| Files | Patch % | Lines |
|---|---|---|
| src/utils/thread_helper.cpp | 0.00% | 20 Missing :warning: |
| src/common/types.cpp | 0.00% | 12 Missing :warning: |
| src/common/types.hpp | 66.66% | 2 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #2284 +/- ##
===========================================
- Coverage 55.77% 39.88% -15.90%
===========================================
Files 87 89 +2
Lines 6890 9857 +2967
Branches 0 725 +725
===========================================
+ Hits 3843 3931 +88
- Misses 3047 5728 +2681
- Partials 0 198 +198
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Looks great. Thanks @zesonzhang
I just updated a new version per comment, can you please take a look? The diff commit is here. The main change is to collect more information about external route added. And then replace NodeDivergenceInfo with ExternalRoutes in proto to make the message dedicated for external route info. NodeDivergenceInfo will be added in the future.
Thanks!
@jwhui can we get this PR merged?
@jwhui can we get this PR merged?
It looks like you have a number of commits in this PR. Did you want to keep them separate or are you OK to squash them?
@jwhui can we get this PR merged?
It looks like you have a number of commits in this PR. Did you want to keep them separate or are you OK to squash them?
OK to squash! Thanks!