Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions oteps/0199-support-elastic-common-schema-in-opentelemetry.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Example of a Nginx Access Log entry structured with ECS

## Principles

| Description | [OTel Logs and Event Record](../specification/logs/data-model.md#log-and-event-record-definition) | [Elastic Common Schema (ECS)](https://www.elastic.co/docs/reference/ecs) |
| Description | [OTel Logs and Event Record](../specification/logs/data-model.md#open-telemetry-protocol-data-model) | [Elastic Common Schema (ECS)](https://www.elastic.co/docs/reference/ecs) |
| ----------- | ------------- | -------- |
| Metadata shared by all the Log Messages / Spans / Metrics of an application instance | Resource Attributes | ECS fields |
| Metadata specific to each Log Message / Span / Metric data point | Attributes | ECS Fields |
Expand All @@ -158,7 +158,7 @@ Example of a Nginx Access Log entry structured with ECS

## Data Types

| Category | <a href="../specification/logs/data-model.md#log-and-event-record-definition">OTel Logs and Event Record</a> (all or a subset of <a href="https://protobuf.dev/programming-guides/proto3/">GRPC data types</a>) | <a href="https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/field-data-types">ECS Data Types</a> |
| Category | <a href="../specification/logs/data-model.md#open-telemetry-protocol-data-model">OTel Logs and Event Record</a> (all or a subset of <a href="https://protobuf.dev/programming-guides/proto3/">GRPC data types</a>) | <a href="https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/field-data-types">ECS Data Types</a> |
| --- | --- | --- |
| Text | string | <a href="https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/text#text-field-type">text</a>, <a href="https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/text#match-only-text-field-type">match_only_text</a>, <a href="https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/keyword#keyword-field-type">keyword</a> <a href="https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/keyword#constant-keyword-field-type">constant_keyword</a>, <a href="https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/keyword#wildcard-field-type">wildcard</a> |
| Dates | uint64 nanoseconds since Unix epoch | <a href="https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/date">date</a>, <a href="https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/date_nanos">date_nanos</a> |
Expand All @@ -177,23 +177,23 @@ As the markdown code of the tables is hard to read and maintain with very long l

<table>
<tr>
<td><strong><a href="../specification/logs/data-model.md#log-and-event-record-definition">OTel Logs and Event Record</a></strong>
<td><strong><a href="../specification/logs/data-model.md#open-telemetry-protocol-data-model">OTel Logs and Event Record</a></strong>
</td>
<td><strong><a href="https://www.elastic.co/docs/reference/ecs">Elastic Common Schema (ECS)</a></strong>
</td>
<td><strong>Description</strong>
</td>
</tr>
<tr>
<td><a href="../specification/logs/data-model.md#log-and-event-record-definition">Timestamp</a> (uint64 nanoseconds since Unix epoch)
<td><a href="../specification/logs/data-model.md#open-telemetry-protocol-data-model">Timestamp</a> (uint64 nanoseconds since Unix epoch)
</td>
<td><a href="https://www.elastic.co/docs/reference/ecs/ecs-base#field-timestamp">@timestamp</a> (date)
</td>
<td>
</td>
</tr>
<tr>
<td><a href="../specification/logs/data-model.md#log-and-event-record-definition">TraceId</a> (byte sequence), <a href="../specification/logs/data-model.md#log-and-event-record-definition">SpanId</a> (byte sequence)
<td><a href="../specification/logs/data-model.md#open-telemetry-protocol-data-model">TraceId</a> (byte sequence), <a href="../specification/logs/data-model.md#open-telemetry-protocol-data-model">SpanId</a> (byte sequence)
</td>
<td><a href="https://www.elastic.co/docs/reference/ecs/ecs-tracing#field-trace-id">trace.id</a> (keyword), <a href="https://www.elastic.co/docs/reference/ecs/ecs-tracing#field-trace-id">span.id</a> (keyword)
</td>
Expand All @@ -209,23 +209,23 @@ As the markdown code of the tables is hard to read and maintain with very long l
</td>
</tr>
<tr>
<td><a href="../specification/logs/data-model.md#log-and-event-record-definition">SeverityText</a> (string)
<td><a href="../specification/logs/data-model.md#open-telemetry-protocol-data-model">SeverityText</a> (string)
</td>
<td><a href="https://www.elastic.co/docs/reference/ecs/ecs-log#field-log-syslog-severity-name">log.syslog.severity.name</a> (keyword), <a href="https://www.elastic.co/docs/reference/ecs/ecs-log#field-log-level">log.level</a> (keyword)
</td>
<td>
</td>
</tr>
<tr>
<td><a href="../specification/logs/data-model.md#log-and-event-record-definition">SeverityNumber</a> (number)
<td><a href="../specification/logs/data-model.md#open-telemetry-protocol-data-model">SeverityNumber</a> (number)
</td>
<td><a href="https://www.elastic.co/docs/reference/ecs/ecs-log#field-log-syslog-severity-code">log.syslog.severity.code</a>
</td>
<td>
</td>
</tr>
<tr>
<td><a href="../specification/logs/data-model.md#log-and-event-record-definition">Body</a> (any)
<td><a href="../specification/logs/data-model.md#open-telemetry-protocol-data-model">Body</a> (any)
</td>
<td><a href="https://www.elastic.co/docs/reference/ecs/ecs-base#field-message">message</a> (match_only_text)
</td>
Expand Down
2 changes: 1 addition & 1 deletion specification/compatibility/logging_trace_context.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
## Overview

OTLP Logs Records have top level fields
representing [trace context](../logs/data-model.md#trace-context-fields). This
representing [trace context](../logs/data-model.md#open-telemetry-protocol-data-model). This
document defines how trace context should be recorded in non-OTLP Log Formats.
To summarize, the following field names should be used in legacy formats:

Expand Down
2 changes: 1 addition & 1 deletion specification/logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Logs can be correlated with the rest of observability data in a few dimensions:
- By the **origin of the telemetry**, also known as the Resource context.
OpenTelemetry traces and metrics contain information about the Resource they
come from. We extend this practice to logs by including the
[Resource](data-model.md#field-resource) in LogRecords.
[Resource](../resource/README.md) in Log data streams.

These 3 correlations can be the foundation of powerful navigational, filtering,
querying and analytical capabilities. OpenTelemetry aims to record and collects
Expand Down
6 changes: 3 additions & 3 deletions specification/logs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The Logs API consist of these main components:

* [LoggerProvider](#loggerprovider) is the entry point of the API. It provides access to `Logger`s.
* [Logger](#logger) is responsible for emitting logs as
[LogRecords](./data-model.md#log-and-event-record-definition).
[LogRecords](./data-model.md#open-telemetry-protocol-data-model).

```mermaid
graph TD
Expand All @@ -67,10 +67,10 @@ The `LoggerProvider` MUST provide the following functions:

#### Get a Logger

This API MUST accept the following [instrumentation scope](data-model.md#field-instrumentationscope)
This API MUST accept the following [instrumentation scope](../common/instrumentation-scope.md)
parameters:

* `name`: Specifies the name of the [instrumentation scope](../common/instrumentation-scope.md),
* `name`: Specifies the name of the instrumentation scope,
such as the [instrumentation library](../glossary.md#instrumentation-library)
(e.g. `io.opentelemetry.contrib.mongodb`), package, module or class name.
If an application or library has built-in OpenTelemetry instrumentation, both
Expand Down
Loading
Loading