OpenTelemetry.Internal.SelfDiagnosticsLogEntry
struct SelfDiagnosticsLogEntry
A fully-captured self-diagnostics log entry.
Gets the ActivityContext that was current when the
entry was emitted, or null if no activity was active.
Gets the event id associated with the entry, if any.
Gets the exception associated with the entry, if any.
Gets the level at which the entry was emitted.
Gets the pre-rendered message text.
Gets the thread id captured when the entry was emitted. This is the OS thread id for
entries sourced from EventSource events (on
runtimes that expose it) and the managed thread id otherwise. Values <= 0 indicate
the id was unavailable and render as dashes.
Gets the UTC timestamp captured when the entry was emitted.
public SelfDiagnosticsLogEntry(DateTime timestampUtc, long threadId, LogLevel level, EventId eventId, string message, Exception exception, ActivityContext? activityContext)
public static SelfDiagnosticsLogEntry Capture(LogLevel level, EventId eventId, string message, Exception exception)
Captures a new entry using the current time, thread, and Current.