Class LogRecord
An individual log record
Inherited Members
Namespace: Unity.Services.Apis.Admin.Observability
Assembly: Unity.Services.Apis.dll
Syntax
[DataContract(Name = "log-record")]
[Preserve]
public class LogRecord
Constructors
LogRecord(string, string, int, string, Dictionary<string, string>, Dictionary<string, string>)
Initializes a new instance of the Log
Declaration
[Preserve]
public LogRecord(string timestamp = null, string severityText = null, int severityNumber = 0, string body = null, Dictionary<string, string> resourceAttributes = null, Dictionary<string, string> logAttributes = null)
Parameters
Type | Name | Description |
---|---|---|
string | timestamp | The timestamp of the record, in RFC3339 format. |
string | severityText | The human-readable severity text. |
int | severityNumber | The matching severity number of the severity text. Refer to OpenTelemetry docs for mappings.. |
string | body | The log message. |
Dictionary<string, string> | resourceAttributes | OpenTelemetry attributes associated with the origin of the log entry. |
Dictionary<string, string> | logAttributes | OpenTelemetry Log Attributes associated with the particular log entry, can contain user-defined attributes. |
Properties
Body
The log message
Declaration
[DataMember(Name = "body", EmitDefaultValue = false)]
[Preserve]
public string Body { get; set; }
Property Value
Type | Description |
---|---|
string | The log message |
LogAttributes
OpenTelemetry Log Attributes associated with the particular log entry, can contain user-defined attributes
Declaration
[DataMember(Name = "logAttributes", EmitDefaultValue = false)]
[Preserve]
public Dictionary<string, string> LogAttributes { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> | OpenTelemetry Log Attributes associated with the particular log entry, can contain user-defined attributes |
ResourceAttributes
OpenTelemetry attributes associated with the origin of the log entry
Declaration
[DataMember(Name = "resourceAttributes", EmitDefaultValue = false)]
[Preserve]
public Dictionary<string, string> ResourceAttributes { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> | OpenTelemetry attributes associated with the origin of the log entry |
SeverityNumber
The matching severity number of the severity text. Refer to OpenTelemetry docs for mappings.
Declaration
[DataMember(Name = "severityNumber", EmitDefaultValue = false)]
[Preserve]
public int SeverityNumber { get; set; }
Property Value
Type | Description |
---|---|
int | The matching severity number of the severity text. Refer to OpenTelemetry docs for mappings. |
SeverityText
The human-readable severity text
Declaration
[DataMember(Name = "severityText", EmitDefaultValue = false)]
[Preserve]
public string SeverityText { get; set; }
Property Value
Type | Description |
---|---|
string | The human-readable severity text |
Timestamp
The timestamp of the record, in RFC3339 format
Declaration
[DataMember(Name = "timestamp", EmitDefaultValue = false)]
[Preserve]
public string Timestamp { get; set; }
Property Value
Type | Description |
---|---|
string | The timestamp of the record, in RFC3339 format |