Sparkplug B: no support for per-metric timestamp ...
# umh-support
p
After noticing some metric data loss along the stream, started examining some sparkplug messages in detail, comparing to the UNS data and came to the conlusion that the plugin extracts spb_timestamp from the payload-level timestamp only and not from the per-metric timestamp. Is my assumption correct? In that case, when a Sparkplug NDATA/DDATA message contains multiple metrics, the plugin assigns all metrics the same root timestamp (payload.Timestamp). If downstream deduplication uses (timestamp, tag_name) as the composite key, identical timestamps will cause all but one metric to be dropped. The Sparkplug B protobuf does support per-metric timestamps (via metric.Timestamp). Using the exact metric.Timestamp (if provided) is an important feature, aside from the possible data-loss.
a
@pascaldesmet. thanks for flagging this. I will investigate it
Hi @pascaldesmet. we now merged a fix for this that should soon be released https://github.com/united-manufacturing-hub/benthos-umh/pull/416. Hope that will solve it.
p
Hi @Aaron back from some time offline. Hoping to test this soon. Thanks!
10 Views