Skip to content

[Logs API] - New LogRecord abstract class. #1689

@lalitb

Description

@lalitb

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;
         ----
   

 };

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions