Skip to content

Implementing a Recordable interface for Logs  #412

@kxyr

Description

@kxyr

Problem
An important use case of logging is to allow log records to be sent to multiple export destinations, as seen in these logging libraries:

In the current Logging SDK, a LogRecord is created as a unique_pointer by the SDK, then moved to a processor, then passed by const reference to an exporter. This implementation does not allow more than one processor per Logger.

Solution
One solution could be to implement a Recordable interface, similar to what is currently used for traces. The recordable idea outlined here.

Alternatives Considered
Another possible (simpler but less performant) solution is to pass a LogRecord as a shared_ptr to be shared between the multiple processors/exporters. However, this approach could offer inconsistent performance related to memory-management which is a goal.

Additional Context
Further discussion about the Recordable interface can be found in #44 and #49.

cc @alolita @MarkSeufert

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions