liveBook · Manning

Monitoring

As explained in Digital Twins in Action

Logging is the recording of discrete events and contextual information produced by a software system.

Monitoring makes a digital twin’s operation visible. It tracks whether sensor data is arriving and whether the system is behaving as expected. Observability goes further: when a prediction, state update, or action looks wrong, logs, metrics, and traces help explain why. section 3.6 section 10.3.1

Use each signal for a different question:

  • Metrics show changing conditions. Track message frequency, battery voltage, and data quality across sensors; alert when a scheduled transmission is missed. Track the gap between predicted and measured values to spot model degradation. section 3.6 section 10.3.1
  • Logs record discrete events and their context. Give them queryable attributes, such as timestamp, level, component, event type, and trace identifier. Choose log levels deliberately so verbose debugging messages do not obscure failures. section 10.3.1
  • Traces connect one physical event across ingestion, state updates, model inference, and actuation. A shared trace identifier lets you follow the event across components and locate where time was spent. section 10.3.1

Investigating a state update

Suppose an ambient-temperature state update needs investigation. Its structured log records the input source, measured value, ingestion component, and trace identifier. Querying that identifier and sorting by timestamp puts related messages in order, helping reconstruct what happened rather than merely confirming that a metric changed. section 10.3.1

{
  "timestamp": "2025-06-12T14:30:05.123Z",
  "level": "DEBUG",  #1
  "event_type": "STATE_UPDATE",
  "twin_id": "home-01",
  "component": "data_ingest",
  "message": "Updated ambient temperature state.",
  "trace_id": "a1b2-c3d4-e5f6",  #2
  "data": {
    "input_source": "24e124710b423527",
    "value": 22.4,
    "trigger": "telemetry_ingest"
  }
}

The structured state-update record keeps event context in named fields that can be searched during debugging. section 10.3.1

fields @timestamp, component, level, message, data
| filter trace_id = "a1b2-c3d4-e5f6"
| sort @timestamp asc

This Amazon CloudWatch query finds messages with one trace identifier and orders them chronologically. section 10.3.1

Monitoring becomes more important as sensor fleets grow: missed data, draining batteries, and maintenance needs are harder to track manually. It is not the same as controlling the physical system. Traditional monitoring tracks metrics and threshold alerts; a digital twin may also use continuous feedback to support prediction and active control. section 3.6 section 3.1

How Digital Twins in Action covers it

How deep it goes
Explains which metrics, structured log fields, alerts, and traces to use, with a query example; stops short of fleet-wide deployment procedures.
Examples
Uses a missed sensor transmission, a temperature state-update log, and a CloudWatch query filtered by trace identifier.
What you can do after
Apply it via structured logs and Amazon CloudWatch queries to reconstruct events, while configuring alerts for sensor health and prediction drift.
How it connects
Connects sensor telemetry, structured logging, metrics, distributed tracing, model drift, and digital-twin observability.

Also explained in

Compare how 40 books explain monitoring →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Digital Twins in Action. The section links point to the parts of the book it draws on.