Skip to content

Commit

Permalink
Add InstrumentationScope/Logger Name to log data model
Browse files Browse the repository at this point in the history
Contributes to #1215
Contributes to #2358

The topics has been discussed at length.

This [PR](#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.
  • Loading branch information
tigrannajaryan committed Feb 22, 2022
1 parent 10cac7e commit 140ee3f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions specification/logs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
+ [Comparing Severity](#comparing-severity)
* [Field: `Body`](#field-body)
* [Field: `Resource`](#field-resource)
* [Field: `InstrumentationScope`](#field-instrumentationscope)
* [Field: `Attributes`](#field-attributes)
+ [Errors and Exceptions](#errors-and-exceptions)
- [Example Log Records](#example-log-records)
Expand Down Expand Up @@ -194,6 +195,7 @@ SeverityText |The severity text (also known as log level).
SeverityNumber |Numerical value of the severity.
Body |The body of the log record.
Resource |Describes the source of the log.
InstrumentationScope|Describes the scope that emitted the log.
Attributes |Additional information about the event.

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

### Field: `InstrumentationScope`

Type: (Name,Version) tuple of strings.

Description: the [instrumentation scope](../glossary.md#instrumentation-scope).
Multiple occurrences of events coming from the same scope can happen across time and
they all have the same value of `InstrumentationScope`. For log sources which define
a logger name (e.g. Java
[Logger Name](https://docs.oracle.com/javase/7/docs/api/java/util/logging/Logger.html#getLogger(java.lang.String)))
the Logger Name SHOULD be recorded as the Instrumentation Scope name.

Version is optional. Name SHOULD be specified if version is specified, otherwise Name
is optional.

### Field: `Attributes`

Type: `map<string, any>`.
Expand Down

0 comments on commit 140ee3f

Please sign in to comment.