From 67cf7badb64e0f0b76da4eebd676b3a7a3016317 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 4 Dec 2024 10:50:04 -0800 Subject: [PATCH 1/4] Deprecate Event API and SDK in favor of Emit Event in the Log API --- spec-compliance-matrix.md | 20 -------------------- specification/README.md | 1 - specification/logs/README.md | 4 +--- specification/logs/event-api.md | 13 ++----------- specification/logs/event-sdk.md | 3 ++- specification/versioning-and-stability.md | 4 +--- 6 files changed, 6 insertions(+), 39 deletions(-) diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index d2c47e48ea5..ae6011a74a3 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -203,26 +203,6 @@ Disclaimer: this list of features is still a work in progress, please refer to t | Can plug custom LogRecordExporter | | | + | | + | | | + | | + | | | | Trace Context Injection | | | + | | + | | | + | | + | + | | -## Events - -Features for the [Events API](specification/logs/event-api.md) and the [Events SDK](specification/logs/event-sdk.md). -Disclaimer: Events are currently in Development status - work in progress. - -| Feature | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift | -|----------------------------------------------------------------------------|----------|----|------|----|--------|------|--------|-----|------|-----|------|-------| -| [EventLoggerProvider](specification/logs/event-api.md#eventloggerprovider) | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift | -| Get EventLogger | | | | | | | | | | | | | -| Get EventLogger accepts version | X | | | | | | | | | | | | -| Get EventLogger accepts schema_url | X | | | | | | | | | | | | -| Get EventLogger accepts attributes | X | | | | | | | | | | | | -| [EventLogger](specification/logs/event-api.md#eventlogger) | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift | -| Emit event accepts name | | | | | | | | | | | | | -| Emit event accepts AnyValue body | X | | | | | | | | | | | | -| Emit event accepts severity | X | | | | | | | | | | | | -| Emit event accepts timestamp | X | | | | | | | | | | | | -| Emit event accepts attributes | X | | | | | | | | | | | | -| Emit event accepts context | X | | | | | | | | | | | | - ## Resource | Feature | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift | diff --git a/specification/README.md b/specification/README.md index ecc8ee3a033..32a653e04d6 100644 --- a/specification/README.md +++ b/specification/README.md @@ -33,7 +33,6 @@ path_base_for_github_subdir: - [Metrics](metrics/api.md) - [Logs](logs/README.md) - [API](logs/api.md) - - [Event API](logs/event-api.md) - SDK Specification - [Tracing](trace/sdk.md) - [Metrics](metrics/sdk.md) diff --git a/specification/logs/README.md b/specification/logs/README.md index ecf0e84d0cd..38d611d779b 100644 --- a/specification/logs/README.md +++ b/specification/logs/README.md @@ -230,8 +230,7 @@ processor. ### Infrastructure Logs These are logs generated by various infrastructure components, such as -Kubernetes events (if you are wondering why events are discussed in the context -of logs see [Event API Data model](./event-api.md#event-data-model)). Like system logs, the +Kubernetes events. Like system logs, the infrastructure logs lack a trace context and can be enriched by the resource context - information about the node, pod, container, etc. @@ -447,7 +446,6 @@ standard output. * [Logs API](./api.md) * [Logs SDK](./sdk.md) * [Logs Data Model](./data-model.md) -* [Event API](./event-api.md) * [Trace Context in non-OTLP Log Formats](../compatibility/logging_trace_context.md) ## References diff --git a/specification/logs/event-api.md b/specification/logs/event-api.md index 5a89336cde0..7d17f7f9e74 100644 --- a/specification/logs/event-api.md +++ b/specification/logs/event-api.md @@ -1,6 +1,7 @@ # Events API -**Status**: [Development](../document-status.md) +**Status**: [Deprecated](../document-status.md) (was never stabilized), +see [Emit Event](./api.md#emit-an-event) in the Logs API for replacement.
Table of Contents @@ -9,7 +10,6 @@ -- [Logs API Development](#logs-api-development) - [Event Data model](#event-data-model) - [Event API use cases](#event-api-use-cases) - [EventLoggerProvider](#eventloggerprovider) @@ -31,15 +31,6 @@ The Event API consists of these main components: provides access to `EventLogger`s. * [EventLogger](#eventlogger) is the component responsible for emitting events. -## Logs API Development - -> [!NOTE] -> We are currently in the process of defining a new [Logs API](./api.md). - -The intent is that this Logs API will incorporate the current functionality of this existing Events API and once it is defined and implemented, the Events API usage will be migrated, deprecated, renamed and eventually removed. - -No further work is scheduled for the current Events API definition at this time. - ## Event Data model Wikipedia’s [definition of log file](https://en.wikipedia.org/wiki/Log_file): diff --git a/specification/logs/event-sdk.md b/specification/logs/event-sdk.md index b0322f1f77b..25a66a1734b 100644 --- a/specification/logs/event-sdk.md +++ b/specification/logs/event-sdk.md @@ -1,6 +1,7 @@ # Events SDK -**Status**: [Development](../document-status.md) +**Status**: [Deprecated](../document-status.md) (was never stabilized), +see the [Logs SDK](./sdk.md) and [Emit Event](./api.md#emit-an-event) in the Logs API for replacement.
Table of Contents diff --git a/specification/versioning-and-stability.md b/specification/versioning-and-stability.md index 570aa11ba9e..22f9f8e96b0 100644 --- a/specification/versioning-and-stability.md +++ b/specification/versioning-and-stability.md @@ -247,9 +247,7 @@ Semantic Conventions defines the set of fields in the OTLP data model: - The attribute keys provided on the LogRecord - The attribute values provided on the LogRecord that are defined in a list of well-known values. - - For log records that are [Log Events](logs/event-api.md) - - The following data provided to [emit event](logs/event-api.md#emit-event): - - The event name (the value of the `event.name` attribute) + - The event name (the value of the `event.name` attribute) Things not listed in the above are not expected to remain stable via semantic convention and are allowed (or expected) to change. A few examples: From 4254308b730ac24d90055f79713d6111e7db6918 Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 4 Dec 2024 11:20:25 -0800 Subject: [PATCH 2/4] Add change log entry --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e848eb50af..b9a8fab8561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,9 @@ release. ### Events +- Deprecate Event API and SDK in favor of Emit Event in the Log API. + ([#4319](https://github.com/open-telemetry/opentelemetry-specification/pull/4319)) + ### Baggage ### Resource From 8d3d12c1bc3864c2276dbc8217a3668277c1e57e Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 4 Dec 2024 12:58:55 -0800 Subject: [PATCH 3/4] Add EmitEvent to metrix --- spec-compliance-matrix.md | 1 + 1 file changed, 1 insertion(+) diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index ae6011a74a3..192e9aab745 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -193,6 +193,7 @@ Disclaimer: this list of features is still a work in progress, please refer to t | LoggerProvider.Shutdown | | | + | | + | | | + | | + | - | | | LoggerProvider.ForceFlush | | | + | | + | | | + | | + | - | | | Logger.Emit(LogRecord) | | | + | | + | | | + | | + | - | | +| Logger.EmitEvent(LogRecord) | | | | | | | | | | | | | | Logger.Enabled | X | + | | | | | | | + | + | | | | SimpleLogRecordProcessor | | | + | | + | | | + | | + | | | | BatchLogRecordProcessor | | | + | | + | | | + | | + | | | From 66246790ef96c5bae78fe490bc4361daa651aa8a Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Thu, 5 Dec 2024 07:53:20 -0800 Subject: [PATCH 4/4] Update CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Robert Pająk --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9a8fab8561..4a60de2b2cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ release. ### Events -- Deprecate Event API and SDK in favor of Emit Event in the Log API. +- Deprecate Events API and SDK in favor of having Events support in the Logs API and SDK. ([#4319](https://github.com/open-telemetry/opentelemetry-specification/pull/4319)) ### Baggage