Skip to content

Commit

Permalink
move all event data model requirements to semconv
Browse files Browse the repository at this point in the history
  • Loading branch information
tedsuo committed Oct 29, 2024
1 parent fccd274 commit f22d8cb
Showing 1 changed file with 31 additions and 38 deletions.
69 changes: 31 additions & 38 deletions specification/logs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,36 @@

<!-- toc -->

- [Logs Data Model](#logs-data-model)
- [Design Notes](#design-notes)
- [Requirements](#requirements)
- [Events](#events)
- [Definitions Used in this Document](#definitions-used-in-this-document)
- [Type `any`](#type-any)
- [Type `map<string, any>`](#type-mapstring-any)
- [Field Kinds](#field-kinds)
- [Log and Event Record Definition](#log-and-event-record-definition)
- [Field: `Timestamp`](#field-timestamp)
- [Field: `ObservedTimestamp`](#field-observedtimestamp)
- [Trace Context Fields](#trace-context-fields)
- [Field: `TraceId`](#field-traceid)
- [Field: `SpanId`](#field-spanid)
- [Field: `TraceFlags`](#field-traceflags)
- [Severity Fields](#severity-fields)
- [Field: `SeverityText`](#field-severitytext)
- [Field: `SeverityNumber`](#field-severitynumber)
- [Mapping of `SeverityNumber`](#mapping-of-severitynumber)
- [Reverse Mapping](#reverse-mapping)
- [Error Semantics](#error-semantics)
- [Displaying Severity](#displaying-severity)
- [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)
- [Example Mappings](#example-mappings)
- [References](#references)
- [Design Notes](#design-notes)
* [Requirements](#requirements)
* [Events](#events)
* [Definitions Used in this Document](#definitions-used-in-this-document)
+ [Type `any`](#type-any)
+ [Type `map`](#type-mapstring-any)
* [Field Kinds](#field-kinds)
- [Log and Event Record Definition](#log-and-event-record-definition)
* [Field: `Timestamp`](#field-timestamp)
* [Field: `ObservedTimestamp`](#field-observedtimestamp)
* [Trace Context Fields](#trace-context-fields)
+ [Field: `TraceId`](#field-traceid)
+ [Field: `SpanId`](#field-spanid)
+ [Field: `TraceFlags`](#field-traceflags)
* [Severity Fields](#severity-fields)
+ [Field: `SeverityText`](#field-severitytext)
+ [Field: `SeverityNumber`](#field-severitynumber)
+ [Mapping of `SeverityNumber`](#mapping-of-severitynumber)
+ [Reverse Mapping](#reverse-mapping)
+ [Error Semantics](#error-semantics)
+ [Displaying Severity](#displaying-severity)
+ [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)
- [Example Mappings](#example-mappings)
- [References](#references)

<!-- tocstop -->

Expand Down Expand Up @@ -104,17 +103,11 @@ The Data Model aims to successfully represent 3 sorts of logs and events:
**Status**: [Development](../document-status.md)

Events are OpenTelemetry's standardized format for LogRecords. All semantic
conventions defined for logs SHOULD be formatted as Events.
conventions defined for logs SHOULD be formatted as Events. Requirements and details for the Event format can be found in the [semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/events.md).

Events are intended to be used by OpenTelemetry instrumentation. It is not a
requirement that all LogRecords are formatted as Events.

The Event format is as follows. Events are defined by an
[`event.name` attribute](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/events.md).
All Events with the same `event.name` MUST conform to the same schema for
both their `Attributes` and their `Body`. Any additional requirements for
individual events can be found in the [semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/events.md).

### Definitions Used in this Document

In this document we refer to types `any` and `map<string, any>`, defined as
Expand Down

0 comments on commit f22d8cb

Please sign in to comment.