Skip to content

Commit 16d0213

Browse files
Add LoggerName to Log Data Model
Resolves #1215 It appears that logger name is sufficiently different to warrant a new concept in Otel logs. For detailed discussion see the link above.
1 parent f2869a3 commit 16d0213

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

specification/logs/data-model.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ SpanId |Request span id.
155155
TraceFlags |W3C trace flag.
156156
SeverityText |The severity text (also known as log level).
157157
SeverityNumber |Numerical value of the severity.
158+
LoggerName |Name of the logger that is used for producing the log record.
158159
Name |Short event identifier.
159160
Body |The body of the log record.
160161
Resource |Describes the source of the log.
@@ -354,6 +355,13 @@ comparisons `SeverityNumber` field should be used. `SeverityNumber` can be
354355
compared to another `SeverityNumber` or to numbers in the 1..24 range (or to the
355356
corresponding short names).
356357

358+
### Field: `LoggerName`
359+
360+
The name of the logger that is used for producing the log record. The logger
361+
name is typically chosen by the developer to group related log records. Often
362+
the class name, package name, module name or other logical unit of the
363+
application is selected as the logger name.
364+
357365
### Field: `Name`
358366

359367
Type: string.
@@ -434,7 +442,8 @@ Example 1
434442
"SpanId": "43222c2d51a7abe3",
435443
"SeverityText": "INFO",
436444
"SeverityNumber": 9,
437-
"Body": "20200415T072306-0700 INFO I like donuts"
445+
"Body": "20200415T072306-0700 INFO I like donuts",
446+
"LoggerName": "com.example.App.MyClass"
438447
}
439448
```
440449

@@ -716,6 +725,12 @@ Rest of SDIDs -> Attributes["syslog.*"]</td>
716725
<td>Log level.</td>
717726
<td>Severity</td>
718727
</tr>
728+
<tr>
729+
<td>Logger</td>
730+
<td>string</td>
731+
<td>Logger name.</td>
732+
<td>LoggerName</td>
733+
</tr>
719734
<tr>
720735
<td>Message</td>
721736
<td>string</td>
@@ -890,7 +905,7 @@ Field | Type | Description
890905
-----------------|--------------------| ------------------------------------------------------- | ---------------------------
891906
timestamp | string | The time the event described by the log entry occurred. | Timestamp
892907
resource | MonitoredResource | The monitored resource that produced this log entry. | Resource
893-
log_name | string | The URL-encoded LOG_ID suffix of the log_name field identifies which log stream this entry belongs to. | Name
908+
log_name | string | The URL-encoded LOG_ID suffix of the log_name field identifies which log stream this entry belongs to. | LoggerName
894909
json_payload | google.protobuf.Struct | The log entry payload, represented as a structure that is expressed as a JSON object. | Body
895910
proto_payload | google.protobuf.Any | The log entry payload, represented as a protocol buffer. | Body
896911
text_payload | string | The log entry payload, represented as a Unicode string (UTF-8). | Body

0 commit comments

Comments
 (0)