Skip to content

Commit 6129bd3

Browse files
Add InstrumentationScope/Logger Name to log data model
Contributes to open-telemetry#1215 Contributes to open-telemetry#2358 The topics has been discussed at length. This [PR](open-telemetry#2276) made possible to record instrumentation scope for traces and metrics. The intent is also to have instrumentation scope part of log data model and where available record logger name as the instrumentation scope name.
1 parent 560e5a8 commit 6129bd3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

specification/logs/data-model.md

+16
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
+ [Comparing Severity](#comparing-severity)
3131
* [Field: `Body`](#field-body)
3232
* [Field: `Resource`](#field-resource)
33+
* [Field: `InstrumentationScope`](#field-instrumentationscope)
3334
* [Field: `Attributes`](#field-attributes)
3435
+ [Errors and Exceptions](#errors-and-exceptions)
3536
- [Example Log Records](#example-log-records)
@@ -194,6 +195,7 @@ SeverityText |The severity text (also known as log level).
194195
SeverityNumber |Numerical value of the severity.
195196
Body |The body of the log record.
196197
Resource |Describes the source of the log.
198+
InstrumentationScope|Describes the scope that emitted the log.
197199
Attributes |Additional information about the event.
198200

199201
Below is the detailed description of each field.
@@ -436,6 +438,20 @@ from the same source. SHOULD follow OpenTelemetry
436438
[semantic conventions for Resources](../resource/semantic_conventions/README.md).
437439
This field is optional.
438440

441+
### Field: `InstrumentationScope`
442+
443+
Type: (Name,Version) tuple of strings.
444+
445+
Description: the [instrumentation scope](../glossary.md#instrumentation-scope).
446+
Multiple occurrences of events coming from the same scope can happen across time and
447+
they all have the same value of `InstrumentationScope`. For log sources which define
448+
a logger name (e.g. Java
449+
[Logger Name](https://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html#getLogger(java.lang.String)))
450+
the Logger Name SHOULD be recorded as the Instrumentation Scope name.
451+
452+
Version is optional. Name SHOULD be specified if version is specified, otherwise Name
453+
is optional.
454+
439455
### Field: `Attributes`
440456

441457
Type: `map<string, any>`.

0 commit comments

Comments
 (0)