Class LogEvent
Used for serializing the log records.
Namespace: Neon.Diagnostics
Assembly: Neon.Common.dll
Syntax
public class LogEvent
Properties
Attributes
The event tags.
Declaration
public IReadOnlyDictionary<string, object> Attributes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, object> |
Body
The event message.
Declaration
public string Body { get; set; }
Property Value
Type | Description |
---|---|
string |
CategoryName
The event source category name.
Declaration
public string CategoryName { get; set; }
Property Value
Type | Description |
---|---|
string |
Resources
The related event resources.
Declaration
public IReadOnlyDictionary<string, object> Resources { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<string, object> |
Severity
The human readable event severity level.
Declaration
public string Severity { get; }
Property Value
Type | Description |
---|---|
string |
SeverityNumber
The standard OpenTelemetry event severity number.
Declaration
public int SeverityNumber { get; }
Property Value
Type | Description |
---|---|
int |
SpanId
The associated trace span ID.
Declaration
public string SpanId { get; set; }
Property Value
Type | Description |
---|---|
string |
TraceId
The associated trace ID.
Declaration
public string TraceId { get; set; }
Property Value
Type | Description |
---|---|
string |
TsNs
The event timestamp expressed as Unix Epoch nanoseconds.
Declaration
public long TsNs { get; set; }
Property Value
Type | Description |
---|---|
long |
Methods
Clone()
Clones the current instance. This is used internally when passing instances to a LogEventInterceptor because our logging code reused LogEvent instances to reduce GC pressure.
Declaration
public LogEvent Clone()
Returns
Type | Description |
---|---|
LogEvent | The cloned instance. |