Specs - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/api.md#logrecord
In order to avoid storing any data as part of API implementation, LogRecord can be pure virtual class with setters which would be implemented by SDK. These setters would directly serialize the data using Recordable implementation in format expected by exporter.
Something like -
class LogRecord
{
public:
virtual void SetAttribute(nostd::string_view key,
const common::AttributeValue &value) noexcept = 0;
virtual void SetTimeStamp(common::SystemTimestamp timestamp) noexcept = 0;
----
};
Specs - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/api.md#logrecord
In order to avoid storing any data as part of API implementation,
LogRecordcan be pure virtual class with setters which would be implemented by SDK. These setters would directly serialize the data usingRecordableimplementation in format expected by exporter.Something like -