diff --git a/CHANGELOG.md b/CHANGELOG.md index 64b4bbd65f2..a133c16c10f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,9 @@ release. ### Traces +- Deprecate Record Exception API in favor of using Events. + ([#4825](https://github.com/open-telemetry/opentelemetry-specification/pull/4825)) + ### Metrics - Stabilize sections of Prometheus Metrics Exporter. diff --git a/specification/trace/api.md b/specification/trace/api.md index dba798a1849..206ef022f7a 100644 --- a/specification/trace/api.md +++ b/specification/trace/api.md @@ -681,6 +681,8 @@ in the scope of this requirement and recommendation. #### Record Exception +**Status**: [Deprecated](../document-status.md) + To facilitate recording an exception languages SHOULD provide a `RecordException` method if the language uses exceptions. This is a specialized variant of [`AddEvent`](#add-events), diff --git a/specification/trace/exceptions.md b/specification/trace/exceptions.md index d0377d3958b..b55464f48b6 100644 --- a/specification/trace/exceptions.md +++ b/specification/trace/exceptions.md @@ -1,6 +1,8 @@ # Exceptions -**Status**: [Stable](../document-status.md), Unless otherwise specified. +**Status**: [Deprecated](../document-status.md), follow the +[semantic conventions for recording exceptions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/recording-errors.md#recording-exceptions) +instead. This document defines how to record exceptions and their attributes. @@ -19,8 +21,6 @@ to be set to ERROR. The name of the event MUST be `"exception"`. -**Status**: [Development](../document-status.md) - Refer to the [Recording Errors](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/recording-errors.md) document for the details on how to report errors across signals. - A typical template for an auto-instrumentation implementing this semantic convention using an [API-provided `recordException` method](api.md#record-exception) could look like this (pseudo-Java):