Feedback
Feedback

If you are having issues with the exercises, please create a ticket on DevZone: devzone.nordicsemi.com
Drag & Drop Files, Choose Files to Upload You can upload up to 2 files.

Inspecting metric payloads

Dashboards, Device Vitals, and alerts all start from the same raw material: the metric reports your devices send. When a chart looks wrong, the fastest way to find out why is to look at exactly what a device sent. This topic walks through what a metric payload contains, how to read it, and where to find it.

Metrics and reports

A metric is a named value a device records, such as uptime, battery level, or the number of Bluetooth connections. Devices don’t send metrics one at a time. Instead, they collect readings into a metric report and send the whole report at once.

The most common report is the heartbeat, which the SDK captures every hour by default. A heartbeat summarizes what happened during that interval. You can also define session reports around activities you care about. For example, a fitness wearable might send a workout report with heart rate and step count for each workout.

Anatomy of a payload

Every metric report has two parts: metadata that says where the report came from, and the metric readings themselves.

Metadata

The metadata tells nRF Cloud which device sent the report, what it was running, and what period the report covers:

By default, the captured date is the time nRF Cloud received the data. Devices with a reliable clock can record their own timestamp instead. This matters for devices that batch-upload many heartbeats at once. Without device timestamps, those heartbeats all land at the same moment on the device timeline.

Readings

Below is a simplified view of a heartbeat from a Bluetooth LE wearable:

MetricValueWhat it means
MemfaultSdkMetric_IntervalMs3600000The heartbeat covered one hour
MemfaultSdkMetric_UnexpectedRebootCount0No unexpected reboots during the hour
operational_hours1One hour of operation
operational_crashfree_hours1That hour was crash-free
battery_soc_pct82Battery at 82% at the end of the hour
battery_soc_pct_drop3Battery dropped 3% during the hour
ncs_bt_connection_count2Two Bluetooth connections during the hour
ncs_bt_connection_time_ms3540000Connected for about 59 minutes
step_countnullCustom metric that wasn’t set this hour
Metric payload in the Processing Log

To read a value correctly, it helps to know what kind of metric it is:

  • Counters count events during the interval, such as ncs_bt_connection_count. They reset with each new heartbeat, so a value describes that hour, not the device’s lifetime.
  • Gauges hold an instantaneous value, such as battery_soc_pct.
  • Timers measure time spent in a state, in milliseconds, such as ncs_bt_connection_time_ms.
  • Strings hold text, such as a modem firmware version.

Null values

A null reading means the metric wasn’t set during that interval. nRF Cloud ignores it rather than recording a zero, so a device that never set step_count this hour doesn’t drag down your fleet average. String metrics work differently: if a device doesn’t report one, nRF Cloud keeps the last value it received. That lets a device send a value like a firmware version only at boot or when it changes.

Values nRF Cloud adds

Not every metric you see on a device page came from the device. nRF Cloud fills in some values during processing:

  • the SDK version, OS name, and SoC name, read from the uploaded symbol file
  • details about the phone or gateway that forwarded the data, read from the upload’s HTTP User-Agent

Inspecting a payload

To see a specific report a device sent:

  1. Open Data Ingestion → Processing Log.
  2. Filter by device serial and, optionally, software version or date range.
  3. Expand the entry for the report, then click Inspect payload.

Every upload has a transaction ID. Click the focus transaction button on an entry to see every log from the same upload, which helps when a single upload produced several errors.

Once you have the payload, you can tell whether a strange value on a dashboard came from the device or from how it was processed. A few things to check:

  • The value is wrong in the payload: the problem is on the device, in how the metric is collected.
  • The value is right in the payload but missing from charts: check the metric’s range settings. If a range is set and Accept only values within range is on, out-of-range values are dropped from most features.
  • The value is off by a constant factor: check whether the metric has a scale value. For example, a device might report 3750 millivolts, which nRF Cloud scales to 3.75 volts.
  • Heartbeats are bunched together on the timeline: the device is probably uploading in batches without device timestamps.

Built-in metrics on Nordic platforms

Nordic platforms ship with a standard set of metrics that the SDK either collects automatically or lets you enable with a single setting:

  • Always collected: heartbeat interval, unexpected reboot count, operational hours, and crash-free hours.
  • Enabled in configuration: battery state of charge, sync success and failure, connected time, and uptime.
  • nRF91 Series: LTE metrics such as time to connect, signal strength, and data transferred, with CONFIG_MEMFAULT_NCS_LTE_METRICS.
  • nRF52, nRF53, and nRF54 Series: Bluetooth connection count and connected time, with CONFIG_MEMFAULT_NCS_BT_METRICS.

Because these metrics use reserved names and meanings, nRF Cloud can turn them into ready-made insights called Device Vitals, with no dashboard setup required. Device Vitals and device search cover these in detail. The core metrics behind Device Vitals also don’t count against your metric or device attribute quotas, so you can collect them alongside your own custom metrics.

Custom User-defined Metrics

Beyond the built-in Metrics provided out of the box, you can also define your own Custom Metrics to track any data you need! See the documentation to learn more about using Custom Metrics.

Switch language?

Progress is tracked separately for each language. Switching will continue from your progress in that language or start fresh if you haven't begun.

Your current progress is saved, and you can switch back anytime.

Register an account
Already have an account? Log in
(All fields are required unless specified optional)

  • 8 or more characters
  • Upper and lower case letters
  • At least one number or special character

Forgot your password?
Enter the email associated with your account, and we will send you a link to reset your password.