ot-br-posix icon indicating copy to clipboard operation
ot-br-posix copied to clipboard

[telemetry] add external route related telemetry

Open zesonzhang opened this issue 1 year ago • 2 comments

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 has route ::/0
  • has_ula_route_added: if leader network data has route fc00::/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.

zesonzhang avatar May 11 '24 08:05 zesonzhang

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.

codecov[bot] avatar May 11 '24 09:05 codecov[bot]

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!

zesonzhang avatar May 23 '24 03:05 zesonzhang

@jwhui can we get this PR merged?

zesonzhang avatar May 31 '24 06:05 zesonzhang

@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 avatar May 31 '24 07:05 jwhui

@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!

zesonzhang avatar May 31 '24 07:05 zesonzhang