Class EventLogger
Defined in File event_logger.h
Inheritance Relationships
Derived Types
public opentelemetry::logs::NoopEventLogger
(Class NoopEventLogger)public opentelemetry::sdk::logs::EventLogger
(Class EventLogger)
Class Documentation
-
class EventLogger
Handles event log record creation.
Subclassed by opentelemetry::logs::NoopEventLogger, opentelemetry::sdk::logs::EventLogger
Public Functions
-
virtual ~EventLogger() = default
-
virtual const nostd::string_view GetName() noexcept = 0
-
virtual void EmitEvent(nostd::string_view event_name, nostd::unique_ptr<LogRecord> &&log_record) noexcept = 0
Emit a event Log Record object
- Parameters:
event_name – Event name
log_record – Log record
-
template<class ...ArgumentType>
inline void EmitEvent(nostd::string_view event_name, ArgumentType&&... args) Emit a event Log Record object with arguments
- Parameters:
event_name – Event name
- Template Parameters:
args – Arguments which can be used to set data of log record by type. Severity -> severity, severity_text string_view -> body AttributeValue -> body SpanContext -> span_id,tace_id and trace_flags SpanId -> span_id TraceId -> tace_id TraceFlags -> trace_flags SystemTimestamp -> timestamp system_clock::time_point -> timestamp KeyValueIterable -> attributes Key value iterable container -> attributes span<pair<string_view, AttributeValue>> -> attributes(return type of MakeAttributes)
-
virtual ~EventLogger() = default