Define custom metrics in your firmware using the Memfault SDK Metrics API: call MEMFAULT_METRICS_KEY_DEFINE for each metric in memfault_metrics_heartbeat_config.def, specifying the type (unsigned, signed, timer, string).
Record metric values at runtime with MEMFAULT_METRIC_SET_UNSIGNED or MEMFAULT_METRIC_TIMER_START/STOP; the SDK batches them into heartbeat events on a configurable interval (default 1 hour).
Enable coredump capture in the platform port (memfault_platform_coredump_get_regions); on a fault the SDK saves a compact coredump to a dedicated flash region using the registered storage backend.
Implement the memfault_platform_chunk_iterate callback or use a background upload task to drain the chunk queue to the Memfault chunks endpoint after each network connect.
In the Memfault dashboard, create metric charts and fleet-wide percentile views using the collected heartbeat data; set alert rules for metrics exceeding thresholds.
Use the Memfault Issues view to triage coredumps grouped by deduplicated call stack trace; link issues to firmware versions to track regression.
Known gotchas
Coredump capture regions must be sized to hold the stack and BSS sections of interest; undersizing causes truncated coredumps that cannot be symbolicated.
Metrics are only uploaded when the firmware explicitly drains the chunk queue; if the upload task is not scheduled regularly, heartbeat data accumulates and may overflow the ring buffer.
The SDK deduplicates coredump issues server-side by call stack hash; ensure your build includes debug symbols or a symbol file upload to get meaningful stack traces rather than raw addresses.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp