You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
modules: memfault-firmware-sdk: Add option to post metrics on boot
Add a Kconfig option to enable posting metrics on boot without waiting
for the first upload interval.
`CONFIG_MEMFAULT_NCS_POST_INITIAL_HEARTBEAT_ON_NETWORK_CONNECTED`
Minor cleanup in memfault_lte_coredump:
- Add support for the new Kconfig option.
- Make state structure variable non-global as global variables
should be avoided where possible.
- Remove the word "coredump" from state names as the layer not
only handles coredumps.
Add documentation for the new option.
Signed-off-by: Simen S. Røstad <[email protected]>
Copy file name to clipboardExpand all lines: doc/nrf/libraries/debug/memfault_ncs.rst
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,11 @@ The library has built-in connection awareness and tries to post the coredump to
68
68
If unsuccessful within the number of attempts, the library gives up.
69
69
If at any point the network is lost during the retry process, the library waits for the device to reconnect before restarting the retry process.
70
70
71
+
When a coredump is found after boot, the library automatically triggers a heartbeat and sends the heartbeat data along with the coredump to Memfault.
72
+
73
+
To also send an initial heartbeat when no coredump is available, set the :kconfig:option:`CONFIG_MEMFAULT_NCS_POST_INITIAL_HEARTBEAT_ON_NETWORK_CONNECTED` Kconfig option to ``y``.
74
+
This is useful for sending initial metrics to Memfault after boot without having to wait for the first automatic upload set by :kconfig:option:`CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD_INTERVAL_SECS`.
75
+
71
76
This feature is useful when you want to post the coredump as soon as possible after a crash and it is not desirable to wait for the next periodic upload set by :kconfig:option:`CONFIG_MEMFAULT_HTTP_PERIODIC_UPLOAD_INTERVAL_SECS`.
72
77
Alternatively, you can manually trigger the coredump upload by calling the :c:func:`memfault_zephyr_port_post_data` function.
73
78
You can use the :c:func:`memfault_coredump_has_valid_coredump` function to check whether a coredump is available.
@@ -122,6 +127,7 @@ Configuration options in |NCS|
122
127
The Kconfig options for Memfault that are defined in |NCS| provide some additional features compared to the options that are already implemented in Memfault SDK:
Copy file name to clipboardExpand all lines: doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -468,6 +468,11 @@ Memfault integration
468
468
469
469
* Updated the ``CONFIG_MEMFAULT_DEVICE_INFO_BUILTIN`` Kconfig option has been renamed to :kconfig:option:`CONFIG_MEMFAULT_NCS_DEVICE_INFO_BUILTIN`.
470
470
471
+
* Added:
472
+
473
+
* The option ``CONFIG_MEMFAULT_NCS_POST_INITIAL_HEARTBEAT_ON_NETWORK_CONNECTED`` to control whether an initial heartbeat is sent when the device connects to a network.
474
+
Useful to be able to show device status and initial metrics in the Memfault dashboard as soon as possible after boot.
0 commit comments