OpenTelemetry is described as “a vendor-neutral open source observability framework for instrumenting, generating, collecting, and exporting telemetry data such as traces, metrics, and logs.” This modern system includes an infrastructure for collecting trace / metrics / log data, but this infrastructure may be too resource intensive for constrained devices. In these cases, it would be useful to be able to collect log / trace information and import it into the OpenTelemetry system.

In OpenTelemetry, a client triggered action can be assigned a globally unique Trace_Id. This Trace_Id is maintained for all actions related to the client request. In addition, actions are grouped using a unique Span_Id. This Span_Id might be promoted to a Parent_Id, when a tree of related trace / log message needs to be generated. This process is illustrated in Figure C.1. The Span_Id in OPC UA is an UInt64, and it should be unique inside of a TraceId inside of an application. An easy manner of achieving this is to just increment an UInt64 and persist the last value across the application.

image018.png

Figure C.1 - OpenTelemetry Mapping to OPC UA

Figure C.1 also illustrates how an OpenTelemetry system could collect LogRecords from an LogObject C.2 describes part of the mapping an import tool would have to perform to convert LogObject LogRecords to OpenTelemetry records.