Skip to content

Commit

Permalink
Move event.domain from InstrumentationScope to LogRecord (open-teleme…
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Nov 14, 2022
1 parent 2ba21ab commit 9e2c8c8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ release.

### Logs

- Move `event.domain` from InstrumentationScope attributes to LogRecord
attributes.
([#2940](https://github.com/open-telemetry/opentelemetry-specification/pull/2940))

### Resource

### Semantic Conventions
Expand Down
6 changes: 4 additions & 2 deletions specification/logs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ the scope has a version (e.g. a library version). Example value: 1.0.0.
- `schema_url` (optional): Specifies the Schema URL that should be recorded in
the emitted telemetry.
- `event_domain` (optional): Specifies the domain for the Events emitted, which
should be added as `event.domain` attribute of the instrumentation scope.
MUST be added as an attribute with the key `event.domain`
to [emitted Events](#emit-event).
- `include_trace_context` (optional): Specifies whether the Trace Context should
automatically be passed on to the Events and Logs emitted by the Logger. This
SHOULD be true by default.
Expand Down Expand Up @@ -153,7 +154,8 @@ This function MAY be named `logEvent`.
* `logRecord` - the [LogRecord](#logrecord) representing the Event.

Events require the `event.domain` attribute. The API MUST not allow creating an
Event if the Logger instance doesn't have `event.domain` scope attribute.
Event if `event_domain` was not specified when
the [Logger was obtained](#get-a-logger).

#### Emit LogRecord

Expand Down
7 changes: 2 additions & 5 deletions specification/logs/semantic_conventions/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

This document describes the attributes of standalone Events that are represented
in the data model by `LogRecord`s. Events are recorded as LogRecords that are shaped
in a special way:

- They have a LogRecord attribute `event.name` (and possibly other LogRecord attributes).
- They have an InstrumentationScope with a non-empty `Name` and with an
InstrumentationScope attribute `event.domain` (and possibly other InstrumentationScope attributes).
in a special way: Event LogRecords have the attributes `event.domain`
and `event.name` (and possibly other LogRecord attributes).

The `event.domain` attribute is used to logically separate events from different
systems. For example, to record Events from browser apps, mobile apps and
Expand Down

0 comments on commit 9e2c8c8

Please sign in to comment.